X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread-commands.cpp;h=1de6ff58be3609d1f24690a055cfcfc756709cce;hb=f370852feddd5554281c3ce60d7fa3dfeb8869a1;hp=60095115947e5e8c362415b046e5d6816b5bda56;hpb=7966af5763c4aaca39df9bbfa9277ff15715c720;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/notification-thread-commands.cpp b/src/bin/lttng-sessiond/notification-thread-commands.cpp index 600951159..1de6ff58b 100644 --- a/src/bin/lttng-sessiond/notification-thread-commands.cpp +++ b/src/bin/lttng-sessiond/notification-thread-commands.cpp @@ -7,9 +7,9 @@ #include #include -#include "notification-thread.h" -#include "notification-thread-commands.h" -#include +#include "notification-thread.hpp" +#include "notification-thread-commands.hpp" +#include #include #include #include @@ -33,7 +33,7 @@ int run_command_wait(struct notification_thread_handle *handle, cds_list_add_tail(&cmd->cmd_list_node, &handle->cmd_queue.list); /* Wake-up thread. */ - ret = lttng_write(lttng_pipe_get_writefd(handle->cmd_queue.event_pipe), + ret = lttng_write(handle->cmd_queue.event_fd, ¬ification_counter, sizeof(notification_counter)); if (ret != sizeof(notification_counter)) { PERROR("write to notification thread's queue event fd"); @@ -59,7 +59,7 @@ struct notification_thread_command *notification_thread_command_copy( { struct notification_thread_command *new_cmd; - new_cmd = (notification_thread_command *) zmalloc(sizeof(*new_cmd)); + new_cmd = zmalloc(); if (!new_cmd) { goto end; } @@ -89,7 +89,7 @@ int run_command_no_wait(struct notification_thread_handle *handle, cds_list_add_tail(&new_cmd->cmd_list_node, &handle->cmd_queue.list); /* Wake-up thread. */ - ret = lttng_write(lttng_pipe_get_writefd(handle->cmd_queue.event_pipe), + ret = lttng_write(handle->cmd_queue.event_fd, ¬ification_counter, sizeof(notification_counter)); if (ret != sizeof(notification_counter)) { PERROR("write to notification thread's queue event fd"); @@ -425,7 +425,7 @@ struct lttng_event_notifier_notification *lttng_event_notifier_notification_crea LTTNG_ASSERT(domain != LTTNG_DOMAIN_NONE); LTTNG_ASSERT((payload && payload_size) || (!payload && !payload_size)); - notification = (lttng_event_notifier_notification *) zmalloc(sizeof(struct lttng_event_notifier_notification)); + notification = zmalloc(); if (notification == NULL) { ERR("Error allocating notification"); goto end;