mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
libzpool: set thread names
Arrange for the thread/task name to be set when new threads are created. This makes them visible in the process table etc. pthread_setname_np() is generally available in glibc, musl and FreeBSD, so no test is required. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #16140
This commit is contained in:
committed by
Brian Behlendorf
parent
7ac00d3c26
commit
4429ad9276
@@ -295,8 +295,8 @@ taskq_create(const char *name, int nthreads, pri_t pri,
|
||||
}
|
||||
|
||||
for (t = 0; t < nthreads; t++)
|
||||
VERIFY((tq->tq_threadlist[t] = thread_create(NULL, 0,
|
||||
taskq_thread, tq, 0, &p0, TS_RUN, pri)) != NULL);
|
||||
VERIFY((tq->tq_threadlist[t] = thread_create_named(tq->tq_name,
|
||||
NULL, 0, taskq_thread, tq, 0, &p0, TS_RUN, pri)) != NULL);
|
||||
|
||||
return (tq);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user