X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Faction-executor.cpp;fp=src%2Fbin%2Flttng-sessiond%2Faction-executor.cpp;h=23a99a1acbbb7ec94458ad79a5dc7d9a85ba68ee;hp=0b910d474ca3c01c0ee01c245d0c4c25c52b8a85;hb=f149493493fbd8a3efa4748832c03278c96c38ca;hpb=2d7da3031c65c4569ff2428a7c2cad30007f3b50 diff --git a/src/bin/lttng-sessiond/action-executor.cpp b/src/bin/lttng-sessiond/action-executor.cpp index 0b910d474..23a99a1ac 100644 --- a/src/bin/lttng-sessiond/action-executor.cpp +++ b/src/bin/lttng-sessiond/action-executor.cpp @@ -36,6 +36,20 @@ #define THREAD_NAME "Action Executor" #define MAX_QUEUED_WORK_COUNT 8192 +struct action_executor { + struct lttng_thread *thread; + struct notification_thread_handle *notification_thread_handle; + struct { + uint64_t pending_count; + struct cds_list_head list; + pthread_cond_t cond; + pthread_mutex_t lock; + } work; + bool should_quit; + uint64_t next_work_item_id; +}; + +namespace { /* * A work item is composed of a dynamic array of sub-items which * represent a flattened, and augmented, version of a trigger's actions. @@ -69,7 +83,6 @@ * trigger object at the moment of execution, if the trigger is found to be * unregistered, the execution is skipped. */ - struct action_work_item { uint64_t id; @@ -94,19 +107,8 @@ struct action_work_subitem { LTTNG_OPTIONAL(uint64_t) session_id; } context; }; +} /* namespace */ -struct action_executor { - struct lttng_thread *thread; - struct notification_thread_handle *notification_thread_handle; - struct { - uint64_t pending_count; - struct cds_list_head list; - pthread_cond_t cond; - pthread_mutex_t lock; - } work; - bool should_quit; - uint64_t next_work_item_id; -}; /* * Only return non-zero on a fatal error that should shut down the action