aboutsummaryrefslogtreecommitdiff
path: root/libntp/work_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'libntp/work_thread.c')
-rw-r--r--libntp/work_thread.c17
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];