Notification iterator: generate automatic notifications when missing
[babeltrace.git] / include / babeltrace / graph / notification-event-internal.h
index 8fffd47ee9b7c1af57b4d42f7439d212a3870d4e..de4a6a1260f996a90bec561ad1b08ce84dffe17f 100644 (file)
@@ -27,6 +27,7 @@
  * SOFTWARE.
  */
 
+#include <babeltrace/compiler-internal.h>
 #include <babeltrace/ctf-ir/event.h>
 #include <babeltrace/graph/notification-internal.h>
 #include <babeltrace/graph/clock-class-priority-map.h>
@@ -41,6 +42,30 @@ struct bt_notification_event {
        struct bt_clock_class_priority_map *cc_prio_map;
 };
 
+static inline
+struct bt_ctf_event *bt_notification_event_borrow_event(
+               struct bt_notification *notif)
+{
+       struct bt_notification_event *notif_event = container_of(notif,
+                       struct bt_notification_event, parent);
+
+       assert(notif_event);
+       return notif_event->event;
+}
+
+static inline
+struct bt_clock_class_priority_map *
+bt_notification_event_borrow_clock_class_priority_map(
+               struct bt_notification *notif)
+{
+       struct bt_notification_event *notif_event = container_of(notif,
+                       struct bt_notification_event, parent);
+
+       assert(notif_event);
+       return notif_event->cc_prio_map;
+}
+
+
 #ifdef __cplusplus
 }
 #endif
This page took 0.023456 seconds and 4 git commands to generate.