Move enabler structures to internal header
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 3 May 2021 14:08:40 +0000 (10:08 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 4 May 2021 14:38:39 +0000 (10:38 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I0769e0ea730f5fbf306bce4f5527c81c193cdbe9

include/lttng/events-internal.h
include/lttng/events.h

index a583a2d3c6b0ff50cfa62341120a7f24cf20b5cf..38ae3a7b702450833c583b9b2fdd2c9a9edbb983 100644 (file)
@@ -78,6 +78,39 @@ struct lttng_kernel_bytecode_filter_ctx {
        enum lttng_kernel_bytecode_filter_result result;
 };
 
+/*
+ * Enabler field, within whatever object is enabling an event. Target of
+ * backward reference.
+ */
+struct lttng_enabler {
+       enum lttng_enabler_format_type format_type;
+
+       /* head list of struct lttng_bytecode_node */
+       struct list_head filter_bytecode_head;
+
+       struct lttng_kernel_abi_event event_param;
+       unsigned int enabled:1;
+
+       uint64_t user_token;            /* User-provided token. */
+};
+
+struct lttng_event_enabler {
+       struct lttng_enabler base;
+       struct list_head node;  /* per-session list of enablers */
+       struct lttng_channel *chan;
+};
+
+struct lttng_event_notifier_enabler {
+       struct lttng_enabler base;
+       uint64_t error_counter_index;
+       struct list_head node;  /* List of event_notifier enablers */
+       struct lttng_event_notifier_group *group;
+
+       /* head list of struct lttng_bytecode_node */
+       struct list_head capture_bytecode_head;
+       uint64_t num_captures;
+};
+
 static inline
 const struct lttng_kernel_type_integer *lttng_kernel_get_type_integer(const struct lttng_kernel_type_common *type)
 {
@@ -157,4 +190,18 @@ int lttng_kernel_interpret_event_filter(const struct lttng_kernel_event_common *
                struct lttng_probe_ctx *probe_ctx,
                void *event_filter_ctx);
 
+static inline
+struct lttng_enabler *lttng_event_enabler_as_enabler(
+               struct lttng_event_enabler *event_enabler)
+{
+       return &event_enabler->base;
+}
+
+static inline
+struct lttng_enabler *lttng_event_notifier_enabler_as_enabler(
+               struct lttng_event_notifier_enabler *event_notifier_enabler)
+{
+       return &event_notifier_enabler->base;
+}
+
 #endif /* _LTTNG_EVENTS_INTERNAL_H */
index 464adb2c2ff9a8ecd187137be8b453ed31ef925d..2b608dfd6e1ce0c4af4e45af7ba9dca733850fc8 100644 (file)
@@ -501,54 +501,6 @@ enum lttng_enabler_format_type {
        LTTNG_ENABLER_FORMAT_NAME,
 };
 
-/*
- * Enabler field, within whatever object is enabling an event. Target of
- * backward reference.
- */
-struct lttng_enabler {
-       enum lttng_enabler_format_type format_type;
-
-       /* head list of struct lttng_bytecode_node */
-       struct list_head filter_bytecode_head;
-
-       struct lttng_kernel_abi_event event_param;
-       unsigned int enabled:1;
-
-       uint64_t user_token;            /* User-provided token. */
-};
-
-struct lttng_event_enabler {
-       struct lttng_enabler base;
-       struct list_head node;  /* per-session list of enablers */
-       struct lttng_channel *chan;
-};
-
-struct lttng_event_notifier_enabler {
-       struct lttng_enabler base;
-       uint64_t error_counter_index;
-       struct list_head node;  /* List of event_notifier enablers */
-       struct lttng_event_notifier_group *group;
-
-       /* head list of struct lttng_bytecode_node */
-       struct list_head capture_bytecode_head;
-       uint64_t num_captures;
-};
-
-
-static inline
-struct lttng_enabler *lttng_event_enabler_as_enabler(
-               struct lttng_event_enabler *event_enabler)
-{
-       return &event_enabler->base;
-}
-
-static inline
-struct lttng_enabler *lttng_event_notifier_enabler_as_enabler(
-               struct lttng_event_notifier_enabler *event_notifier_enabler)
-{
-       return &event_notifier_enabler->base;
-}
-
 struct lttng_channel_ops {
        struct channel *(*channel_create)(const char *name,
                                void *priv,
This page took 0.031467 seconds and 4 git commands to generate.