X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fthread-utils.cpp;h=8e09f6c54dd3e845d6f16de27c0925cffb757ccc;hb=e8c353ad12851366573d9bfe45d333a9e9ff742d;hp=25ea256d5a31100d1b6c9429f89d04744abeb5bb;hpb=1524f98c04431d04e50796f83a9dd29184b3a8a4;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/thread-utils.cpp b/src/bin/lttng-relayd/thread-utils.cpp index 25ea256d5..8e09f6c54 100644 --- a/src/bin/lttng-relayd/thread-utils.cpp +++ b/src/bin/lttng-relayd/thread-utils.cpp @@ -39,10 +39,10 @@ static int notify_thread_pipe(int wpipe) * * Return -1 on error or 0 if all pipes are created. */ -int relayd_init_thread_quit_pipe(void) +int relayd_init_thread_quit_pipe() { return fd_tracker_util_pipe_open_cloexec( - the_fd_tracker, "Thread quit pipe", thread_quit_pipe); + the_fd_tracker, "Thread quit pipe", thread_quit_pipe); } /* @@ -50,7 +50,7 @@ int relayd_init_thread_quit_pipe(void) * * Return 0 on success or -1 on error. */ -int relayd_notify_thread_quit_pipe(void) +int relayd_notify_thread_quit_pipe() { return notify_thread_pipe(thread_quit_pipe[1]); } @@ -58,11 +58,10 @@ int relayd_notify_thread_quit_pipe(void) /* * Close the thread quit pipe. */ -void relayd_close_thread_quit_pipe(void) +void relayd_close_thread_quit_pipe() { if (thread_quit_pipe[0] != -1) { - (void) fd_tracker_util_pipe_close( - the_fd_tracker, thread_quit_pipe); + (void) fd_tracker_util_pipe_close(the_fd_tracker, thread_quit_pipe); } } @@ -77,15 +76,14 @@ bool relayd_is_thread_quit_pipe(const int fd) /* * Create a poll set with O_CLOEXEC and add the thread quit pipe to the set. */ -int create_named_thread_poll_set(struct lttng_poll_event *events, - int size, const char *name) +int create_named_thread_poll_set(struct lttng_poll_event *events, int size, const char *name) { - if (events == NULL || size == 0) { + if (events == nullptr || size == 0) { return -1; } - const auto create_ret = fd_tracker_util_poll_create(the_fd_tracker, - name, events, 1, LTTNG_CLOEXEC); + const auto create_ret = + fd_tracker_util_poll_create(the_fd_tracker, name, events, 1, LTTNG_CLOEXEC); if (create_ret) { PERROR("Failed to create \"%s\" poll file descriptor", name); return -1;