diff options
author | vkalintiris <vasilis@netdata.cloud> | 2022-01-18 10:30:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 10:30:36 +0200 |
commit | e91d1110e5998ede7bc8aecf5309c28176361acf (patch) | |
tree | b785a25971d62a4cd360d24a66679a0f389d6b5d /spawn | |
parent | 63afbd76ef39ca836233354218e95a17ae67270e (diff) |
Do not use dbengine headers when dbengine is disabled. (#11967)
Prior to this commit both daemon/commands.c and spawn/spawn.c used to
include database/engine/rrdenginelib.h, ie. a header file that is available
only when enabling the dbengine feature.
Diffstat (limited to 'spawn')
-rw-r--r-- | spawn/spawn.c | 7 | ||||
-rw-r--r-- | spawn/spawn_client.c | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/spawn/spawn.c b/spawn/spawn.c index 46853ecb91..051955e884 100644 --- a/spawn/spawn.c +++ b/spawn/spawn.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-3.0-or-later #include "spawn.h" -#include "database/engine/rrdenginelib.h" static uv_thread_t thread; int spawn_thread_error; @@ -240,15 +239,15 @@ void spawn_init(void) init_spawn_cmd_queue(); - init_completion(&completion); + completion_init(&completion); error = uv_thread_create(&thread, spawn_client, &completion); if (error) { error("uv_thread_create(): %s", uv_strerror(error)); goto after_error; } /* wait for spawn client thread to initialize */ - wait_for_completion(&completion); - destroy_completion(&completion); + completion_wait_for(&completion); + completion_destroy(&completion); uv_thread_set_name_np(thread, "DAEMON_SPAWN"); if (spawn_thread_error) { diff --git a/spawn/spawn_client.c b/spawn/spawn_client.c index 59f1ccb052..72b56e2bc6 100644 --- a/spawn/spawn_client.c +++ b/spawn/spawn_client.c @@ -201,7 +201,7 @@ void spawn_client(void *arg) spawn_thread_error = 0; spawn_thread_shutdown = 0; /* wake up initialization thread */ - complete(completion); + completion_mark_complete(completion); prot_buffer_len = 0; ret = uv_read_start((uv_stream_t *)&spawn_channel, on_read_alloc, on_pipe_read); @@ -237,5 +237,5 @@ error_after_loop_init: freez(loop); /* wake up initialization thread */ - complete(completion); + completion_mark_complete(completion); } |