···40404141 // Native thread.
4242 struct os_thread thread;
4343+4444+ //! Thread name.
4545+ char name[64];
4346};
44474548struct pool
···78817982 //! Is the pool up and running?
8083 bool running;
8484+8585+ //! Prefix to use for thread names.
8686+ char prefix[32];
8187};
82888389struct group
···335341 struct thread *t = (struct thread *)ptr;
336342 struct pool *p = t->p;
337343344344+ snprintf(t->name, sizeof(t->name), "%s: Worker", p->prefix);
345345+ U_TRACE_SET_THREAD_NAME(t->name);
346346+338347 os_mutex_lock(&p->mutex);
339348340349 while (p->running) {
···387396 */
388397389398struct u_worker_thread_pool *
390390-u_worker_thread_pool_create(uint32_t starting_worker_count, uint32_t thread_count)
399399+u_worker_thread_pool_create(uint32_t starting_worker_count, uint32_t thread_count, const char *prefix)
391400{
392401 XRT_TRACE_MARKER();
393402 int ret;
···408417 p->worker_limit = starting_worker_count;
409418 p->thread_count = thread_count;
410419 p->running = true;
420420+ snprintf(p->prefix, sizeof(p->prefix), "%s", prefix);
411421412422 ret = os_mutex_init(&p->mutex);
413423 if (ret != 0) {
+3-1
src/xrt/auxiliary/util/u_worker.h
···4242 * @param thread_count The number of threads to be created in total,
4343 * this is the maximum threads that can be in
4444 * flight at the same time.
4545+ * @param prefix Prefix to used when naming threads, used for
4646+ * tracing and debugging.
4547 *
4648 * @ingroup aux_util
4749 */
4850struct u_worker_thread_pool *
4949-u_worker_thread_pool_create(uint32_t starting_worker_count, uint32_t thread_count);
5151+u_worker_thread_pool_create(uint32_t starting_worker_count, uint32_t thread_count, const char *prefix);
50525153/*!
5254 * Internal function, only called by reference.