From a12d67fdef76125e14d27633294db52a7abbbbca Mon Sep 17 00:00:00 2001 From: kanoi Date: Wed, 20 Aug 2014 20:48:41 +1000 Subject: [PATCH] ckdb - name the threads --- src/ckdb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ckdb.c b/src/ckdb.c index a7ba17e0..3c17a671 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -8043,6 +8043,8 @@ static void *summariser(__maybe_unused void *arg) { pthread_detach(pthread_self()); + rename_proc("db_summariser"); + while (!everyone_die && !db_load_complete) cksleep_ms(42); @@ -8067,6 +8069,8 @@ static void *logger(__maybe_unused void *arg) pthread_detach(pthread_self()); + rename_proc("db_logger"); + setnow(&now); snprintf(buf, sizeof(buf), "logstart.%ld,%ld", now.tv_sec, now.tv_usec); @@ -8131,6 +8135,8 @@ static void *socketer(__maybe_unused void *arg) pthread_detach(pthread_self()); + rename_proc("db_socketer"); + while (!everyone_die && !db_auths_complete) cksem_mswait(&socketer_sem, 420); @@ -8706,7 +8712,6 @@ static void process_queued(K_ITEM *wq_item) // TODO: equivalent of api_allow static void *listener(void *arg) { - proc_instance_t *pi = (proc_instance_t *)arg; pthread_t log_pt; pthread_t sock_pt; pthread_t summ_pt; @@ -8723,7 +8728,7 @@ static void *listener(void *arg) create_pthread(&summ_pt, summariser, NULL); - rename_proc(pi->sockname); + rename_proc("db_listener"); if (!setup_data()) { if (!everyone_die) {