#ifndef _LTTNG_EVENTS_H
#define _LTTNG_EVENTS_H
+#include <linux/irq_work.h>
#include <linux/version.h>
#include <linux/list.h>
#include <linux/kprobes.h>
struct lttng_probe_ctx {
struct lttng_event *event;
+ struct lttng_event_notifier *event_notifier; // Not sure if we will ever need it.
uint8_t interruptible;
};
const struct lttng_event_field *fields; /* event payload */
unsigned int nr_fields;
struct module *owner;
+ void *event_notifier_callback;
};
struct lttng_probe_desc {
struct list_head bytecode_runtime_head;
int has_enablers_without_bytecode;
+ void (*send_notification)(struct lttng_event_notifier *event_notifier);
struct lttng_event_notifier_group *group; /* Weak ref */
};
struct lttng_event_notifier_group {
struct file *file; /* File associated to event notifier group */
+ struct file *notif_file; /* File used to expose notifications to userspace. */
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_transport *transport;
struct channel *chan; /* Ring buffer channel for event notifier group. */
struct lib_ring_buffer *buf; /* Ring buffer for event notifier group. */
+ wait_queue_head_t read_wait;
+ struct irq_work wakeup_pending; /* Pending wakeup irq work. */
};
struct lttng_metadata_cache {
int lttng_event_notifier_enabler_disable(
struct lttng_event_notifier_enabler *event_notifier_enabler);
int lttng_fix_pending_events(void);
+int lttng_fix_pending_event_notifiers(void);
int lttng_session_active(void);
+bool lttng_event_notifier_active(void);
struct lttng_session *lttng_session_create(void);
int lttng_session_enable(struct lttng_session *session);