diff options
author | Cy Schubert <cy@FreeBSD.org> | 2024-05-10 15:15:56 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2024-05-26 22:55:52 +0000 |
commit | 1f833b3fc9968c3dd7ed79ccf0525ebf16c891ad (patch) | |
tree | 85801af20e3b694584668aeb39ecec75ee71f72c /libntp/work_thread.c | |
parent | ab1f1aa8333369a83ff284848fc3fc2e52d5f29f (diff) |
Diffstat (limited to 'libntp/work_thread.c')
-rw-r--r-- | libntp/work_thread.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libntp/work_thread.c b/libntp/work_thread.c index c1fe5c20c995..0d15c6e36e6f 100644 --- a/libntp/work_thread.c +++ b/libntp/work_thread.c @@ -376,8 +376,12 @@ send_blocking_resp_internal( { # ifdef WORK_PIPE if (1 != write(c->resp_write_pipe, "", 1)) - msyslog(LOG_WARNING, "async resolver: %s", - "failed to notify main thread!"); + msyslog(LOG_WARNING, "async resolver: blocking_get%sinfo" + " failed to notify main thread!", + (BLOCKING_GETNAMEINFO == resp->rtype) + ? "name" + : "addr" + ); # else tickle_sem(c->responses_pending); # endif @@ -489,7 +493,7 @@ start_blocking_thread( /* -------------------------------------------------------------------- * Create a worker thread. There are several differences between POSIX - * and Windows, of course -- most notably the Windows thread is no + * and Windows, of course -- most notably the Windows thread is a * detached thread, and we keep the handle around until we want to get * rid of the thread. The notification scheme also differs: Windows * makes use of semaphores in both directions, POSIX uses a pipe for @@ -520,9 +524,12 @@ start_blocking_thread_internal( } /* remember the thread priority is only within the process class */ if (!SetThreadPriority(c->thr_table[0].thnd, - THREAD_PRIORITY_BELOW_NORMAL)) + THREAD_PRIORITY_BELOW_NORMAL)) { msyslog(LOG_ERR, "Error lowering blocking thread priority: %m"); - + } + if (NULL != pSetThreadDescription) { + (*pSetThreadDescription)(c->thr_table[0].thnd, L"ntp_worker"); + } resumed = ResumeThread(c->thr_table[0].thnd); DEBUG_INSIST(resumed); c->thread_ref = &c->thr_table[0]; |