Replace assert() -> BT_ASSERT() and some preconditions with BT_ASSERT_PRE()
[babeltrace.git] / include / babeltrace / graph / notification-event-internal.h
index 939b77111f610641080704546f2f67a21079fe72..5447a9a0433d26ee9a7e3d0d32dd85ff1a7c867b 100644 (file)
  * 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>
+#include <babeltrace/assert-internal.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -36,9 +39,34 @@ extern "C" {
 
 struct bt_notification_event {
        struct bt_notification parent;
-       struct bt_ctf_event *event;
+       struct bt_event *event;
+       struct bt_clock_class_priority_map *cc_prio_map;
 };
 
+static inline
+struct bt_event *bt_notification_event_borrow_event(
+               struct bt_notification *notif)
+{
+       struct bt_notification_event *notif_event = container_of(notif,
+                       struct bt_notification_event, parent);
+
+       BT_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);
+
+       BT_ASSERT(notif_event);
+       return notif_event->cc_prio_map;
+}
+
+
 #ifdef __cplusplus
 }
 #endif
This page took 0.024326 seconds and 4 git commands to generate.