X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread.cpp;h=cd95e68858f58d68521c29e2d752a15f088430dc;hb=64803277bbdbe0a943360d918298a48157d9da55;hp=e8a2adec9871eb07d68a37010bb479f8602a31c2;hpb=7966af5763c4aaca39df9bbfa9277ff15715c720;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/notification-thread.cpp b/src/bin/lttng-sessiond/notification-thread.cpp index e8a2adec9..cd95e6885 100644 --- a/src/bin/lttng-sessiond/notification-thread.cpp +++ b/src/bin/lttng-sessiond/notification-thread.cpp @@ -7,37 +7,42 @@ #define _LGPL_SOURCE #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include -#include "notification-thread.h" -#include "notification-thread-events.h" -#include "notification-thread-commands.h" -#include "lttng-sessiond.h" -#include "health-sessiond.h" -#include "thread.h" -#include "testpoint.h" +#include "notification-thread.hpp" +#include "notification-thread-events.hpp" +#include "notification-thread-commands.hpp" +#include "lttng-sessiond.hpp" +#include "health-sessiond.hpp" +#include "thread.hpp" +#include "testpoint.hpp" -#include "kernel.h" -#include +#include "kernel.hpp" +#include #include #include #include +/* + * Flag used to temporarily pause data consumption from testpoints. + * + * This variable is dlsym-ed from a test, so needs to be exported. + */ +LTTNG_EXPORT int notifier_consumption_paused; -int notifier_consumption_paused; /* * Destroy the thread data previously created by the init function. */ @@ -89,7 +94,7 @@ struct notification_thread_handle *notification_thread_handle_create( struct notification_thread_handle *handle; struct lttng_pipe *event_pipe = NULL; - handle = (notification_thread_handle *) zmalloc(sizeof(*handle)); + handle = zmalloc(); if (!handle) { goto end; } @@ -157,7 +162,7 @@ char *get_notification_channel_sock_path(void) bool is_root = !getuid(); char *sock_path; - sock_path = (char *) zmalloc(LTTNG_PATH_MAX); + sock_path = calloc(LTTNG_PATH_MAX); if (!sock_path) { goto error; }