Refactoring: combine event hash tables common code
[lttng-modules.git] / include / lttng / events-internal.h
index 86abd8783017caa5eb5494ab940d8092c6d480e9..873adc31201238d2506538ba5e26df15d5aafe0c 100644 (file)
@@ -410,11 +410,11 @@ struct lttng_counter {
        struct lttng_counter_ops *ops;
 };
 
-#define LTTNG_EVENT_NOTIFIER_HT_BITS           12
-#define LTTNG_EVENT_NOTIFIER_HT_SIZE           (1U << LTTNG_EVENT_NOTIFIER_HT_BITS)
+#define LTTNG_EVENT_HT_BITS            12
+#define LTTNG_EVENT_HT_SIZE            (1U << LTTNG_EVENT_HT_BITS)
 
-struct lttng_event_notifier_ht {
-       struct hlist_head table[LTTNG_EVENT_NOTIFIER_HT_SIZE];
+struct lttng_event_ht {
+       struct hlist_head table[LTTNG_EVENT_HT_SIZE];
 };
 
 struct lttng_event_notifier_group {
@@ -423,7 +423,7 @@ struct lttng_event_notifier_group {
        struct list_head node;          /* event notifier group list */
        struct list_head enablers_head; /* List of enablers */
        struct list_head event_notifiers_head; /* List of event notifier */
-       struct lttng_event_notifier_ht event_notifiers_ht; /* Hash table of event notifiers */
+       struct lttng_event_ht events_ht; /* Hash table of event notifiers */
        struct lttng_kernel_channel_buffer_ops *ops;
        struct lttng_transport *transport;
        struct lttng_kernel_ring_buffer_channel *chan;          /* Ring buffer channel for event notifier group. */
@@ -451,13 +451,6 @@ struct lttng_counter_transport {
        struct lttng_counter_ops ops;
 };
 
-#define LTTNG_EVENT_HT_BITS            12
-#define LTTNG_EVENT_HT_SIZE            (1U << LTTNG_EVENT_HT_BITS)
-
-struct lttng_event_ht {
-       struct hlist_head table[LTTNG_EVENT_HT_SIZE];
-};
-
 struct lttng_kernel_session_private {
        struct lttng_kernel_session *pub;       /* Public session interface */
 
@@ -816,11 +809,8 @@ int lttng_syscall_filter_disable_event(struct lttng_kernel_event_common *event);
 int lttng_syscalls_unregister_syscall_table(struct lttng_kernel_syscall_table *syscall_table);
 int lttng_syscalls_destroy_syscall_table(struct lttng_kernel_syscall_table *syscall_table);
 
-long lttng_channel_syscall_mask(struct lttng_kernel_channel_buffer *channel,
+long lttng_syscall_table_get_active_mask(struct lttng_kernel_syscall_table *syscall_table,
                struct lttng_kernel_abi_syscall_mask __user *usyscall_mask);
-
-int lttng_syscalls_create_matching_event_notifiers(
-               struct lttng_event_notifier_enabler *event_notifier_enabler);
 #else
 static inline int lttng_syscalls_register_event(struct lttng_event_enabler_common *event_enabler)
 {
@@ -847,8 +837,8 @@ static inline int lttng_syscalls_destroy_syscall_table(struct lttng_kernel_sysca
        return 0;
 }
 
-static inline long lttng_channel_syscall_mask(struct lttng_kernel_channel_buffer *channel,
-               struct lttng_kernel_syscall_mask __user *usyscall_mask)
+static inline long lttng_syscall_table_get_active_mask(struct lttng_kernel_syscall_table *syscall_table,
+               struct lttng_kernel_abi_syscall_mask __user *usyscall_mask)
 {
        return -ENOSYS;
 }
This page took 0.023063 seconds and 4 git commands to generate.