From d3a3382ac99dbbb8e415edbf5fe651a1ac321e49 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 18 Oct 2021 10:14:13 -0400 Subject: [PATCH] TT#14008 convert threads_join_all arg to bool Change-Id: Ie1ef9bbfe6faaf9fa7ed163d51475f6f353309df --- daemon/aux.c | 2 +- daemon/main.c | 4 ++-- include/aux.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/aux.c b/daemon/aux.c index 594a3f2d7..9668b5ed0 100644 --- a/daemon/aux.c +++ b/daemon/aux.c @@ -133,7 +133,7 @@ static gint thread_equal(gconstpointer a, gconstpointer b) { return !pthread_equal(*x, *y); } -void threads_join_all(int wait) { +void threads_join_all(bool wait) { pthread_t *t; GList *l; diff --git a/daemon/main.c b/daemon/main.c index db7b3399a..e9f6b6a0a 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -1254,7 +1254,7 @@ int main(int argc, char **argv) { while (!rtpe_shutdown) { usleep(100000); - threads_join_all(0); + threads_join_all(false); } // free libevent @@ -1270,7 +1270,7 @@ int main(int argc, char **argv) { if (!is_addr_unspecified(&rtpe_config.redis_ep.address) && rtpe_redis_notify) redis_async_event_base_action(rtpe_redis_notify, EVENT_BASE_LOOPBREAK); - threads_join_all(1); + threads_join_all(true); if (!is_addr_unspecified(&rtpe_config.redis_ep.address) && initial_rtpe_config.redis_delete_async) redis_async_event_base_action(rtpe_redis_write, EVENT_BASE_FREE); diff --git a/include/aux.h b/include/aux.h index e9af52374..37ccfceb5 100644 --- a/include/aux.h +++ b/include/aux.h @@ -343,7 +343,7 @@ struct thread_waker { void thread_waker_add(struct thread_waker *); void thread_waker_del(struct thread_waker *); -void threads_join_all(int); +void threads_join_all(bool); void thread_create_detach_prio(void (*)(void *), void *, const char *, int, const char *); INLINE void thread_create_detach(void (*f)(void *), void *a, const char *name) { thread_create_detach_prio(f, a, NULL, 0, name);