diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-01-26 18:05:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-01-26 18:05:10 +0000 |
commit | 34a0b66bc2d48223748ed1cf5bc1b305c396bd74 (patch) | |
tree | fbd36be86cc6bc4288fe627f2b5beada569848bb /daemon/commands.c | |
parent | Adding upstream version 1.32.1. (diff) | |
download | netdata-34a0b66bc2d48223748ed1cf5bc1b305c396bd74.tar.xz netdata-34a0b66bc2d48223748ed1cf5bc1b305c396bd74.zip |
Adding upstream version 1.33.0.upstream/1.33.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'daemon/commands.c')
-rw-r--r-- | daemon/commands.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/daemon/commands.c b/daemon/commands.c index 18468183..ddf20fe0 100644 --- a/daemon/commands.c +++ b/daemon/commands.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-or-later #include "common.h" -#include "database/engine/rrdenginelib.h" static uv_thread_t thread; static uv_loop_t* loop; @@ -640,7 +639,7 @@ static void command_thread(void *arg) command_thread_error = 0; command_thread_shutdown = 0; /* wake up initialization thread */ - complete(&completion); + completion_mark_complete(&completion); while (command_thread_shutdown == 0) { uv_run(loop, UV_RUN_DEFAULT); @@ -669,7 +668,7 @@ error_after_loop_init: freez(loop); /* wake up initialization thread */ - complete(&completion); + completion_mark_complete(&completion); } static void sanity_check(void) @@ -693,15 +692,15 @@ void commands_init(void) } fatal_assert(0 == uv_rwlock_init(&exclusive_rwlock)); - init_completion(&completion); + completion_init(&completion); error = uv_thread_create(&thread, command_thread, NULL); if (error) { error("uv_thread_create(): %s", uv_strerror(error)); goto after_error; } /* wait for worker thread to initialize */ - wait_for_completion(&completion); - destroy_completion(&completion); + completion_wait_for(&completion); + completion_destroy(&completion); uv_thread_set_name_np(thread, "DAEMON_COMMAND"); if (command_thread_error) { |