X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread.hpp;h=2f77189ad143c7763e9a7ee4fc76280d64d7db2a;hb=HEAD;hp=3444af9c041c24e5570390764bd23a46fd7eb20b;hpb=c9e313bc594f40a86eed237dce222c0fc99c957f;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/notification-thread.hpp b/src/bin/lttng-sessiond/notification-thread.hpp index 3444af9c0..c995fc951 100644 --- a/src/bin/lttng-sessiond/notification-thread.hpp +++ b/src/bin/lttng-sessiond/notification-thread.hpp @@ -10,18 +10,21 @@ #include "action-executor.hpp" #include "thread.hpp" + #include #include #include -#include + #include +#include + #include #include #include #include #include -typedef uint64_t notification_client_id; +using notification_client_id = uint64_t; /* * The notification thread holds no ownership of the tracer event source pipe @@ -63,7 +66,7 @@ struct notification_thread_handle { * has been enqueued. */ struct { - struct lttng_pipe *event_pipe; + int event_fd; struct cds_list_head list; pthread_mutex_t lock; } cmd_queue; @@ -151,19 +154,21 @@ struct notification_thread_handle { * for lookup on registration. * - tracer_event_sources_list: * A list of tracer event source (read side fd) of type -* struct notification_event_tracer_event_source_element. -* + * struct notification_event_tracer_event_source_element. + * * * The thread reacts to the following internal events: * 1) creation of a tracing channel, * 2) destruction of a tracing channel, - * 3) registration of a trigger, - * 4) unregistration of a trigger, - * 5) reception of a channel monitor sample from the consumer daemon, - * 6) Session rotation ongoing, - * 7) Session rotation completed, - * 8) registration of a tracer event source, - * 9) unregistration of a tracer event source, + * 3) creation of a tracing session, + * 4) destruction of a tracing session, + * 5) registration of a trigger, + * 6) unregistration of a trigger, + * 7) reception of a channel monitor sample from the consumer daemon, + * 8) Session rotation ongoing, + * 9) Session rotation completed, + * 10) registration of a tracer event source, + * 11) unregistration of a tracer event source, * * Events specific to notification-emitting triggers: * 9) connection of a notification client, @@ -313,13 +318,11 @@ struct notification_thread_state { }; /* notification_thread_data takes ownership of the channel monitor pipes. */ -struct notification_thread_handle *notification_thread_handle_create( - struct lttng_pipe *ust32_channel_monitor_pipe, - struct lttng_pipe *ust64_channel_monitor_pipe, - struct lttng_pipe *kernel_channel_monitor_pipe); -void notification_thread_handle_destroy( - struct notification_thread_handle *handle); -struct lttng_thread *launch_notification_thread( - struct notification_thread_handle *handle); +struct notification_thread_handle * +notification_thread_handle_create(struct lttng_pipe *ust32_channel_monitor_pipe, + struct lttng_pipe *ust64_channel_monitor_pipe, + struct lttng_pipe *kernel_channel_monitor_pipe); +void notification_thread_handle_destroy(struct notification_thread_handle *handle); +struct lttng_thread *launch_notification_thread(struct notification_thread_handle *handle); #endif /* NOTIFICATION_THREAD_H */