Clean-up: modernize pretty_xml.cpp
[lttng-tools.git] / src / bin / lttng-sessiond / notification-thread.hpp
index 3444af9c041c24e5570390764bd23a46fd7eb20b..c995fc951d8e515c30c1c237b6be25b894bf20eb 100644 (file)
 
 #include "action-executor.hpp"
 #include "thread.hpp"
+
 #include <common/compat/poll.hpp>
 #include <common/hashtable/hashtable.hpp>
 #include <common/pipe.hpp>
-#include <lttng/trigger/trigger.h>
+
 #include <lttng/domain.h>
+#include <lttng/trigger/trigger.h>
+
 #include <pthread.h>
 #include <semaphore.h>
 #include <urcu.h>
 #include <urcu/list.h>
 #include <urcu/rculfhash.h>
 
-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 */
This page took 0.024083 seconds and 4 git commands to generate.