lib: use object pool for event and packet notifications
[babeltrace.git] / lib / graph / notification / discarded-elements.c
index 3154fee3d968b053612828d5c66d453e31e70921..0dfd757966dc070740de2a48a0e501970077e331 100644 (file)
@@ -53,6 +53,7 @@ void bt_notification_discarded_elements_destroy(struct bt_object *obj)
 
 BT_HIDDEN
 struct bt_notification *bt_notification_discarded_elements_create(
+               struct bt_graph *graph,
                enum bt_notification_type type,
                struct bt_stream *stream,
                struct bt_clock_value *begin_clock_value,
@@ -77,7 +78,7 @@ struct bt_notification *bt_notification_discarded_elements_create(
        }
 
        bt_notification_init(&notification->parent, type,
-               bt_notification_discarded_elements_destroy);
+               bt_notification_discarded_elements_destroy, NULL);
        ret_notif = &notification->parent;
        notification->stream = bt_get(stream);
        notification->begin_clock_value = bt_get(begin_clock_value);
@@ -101,7 +102,7 @@ end:
 
 BT_HIDDEN
 struct bt_clock_value *
-bt_notification_discarded_elements_get_begin_clock_value(
+bt_notification_discarded_elements_borrow_begin_clock_value(
                enum bt_notification_type type,
                struct bt_notification *notification)
 {
@@ -111,12 +112,12 @@ bt_notification_discarded_elements_get_begin_clock_value(
        BT_ASSERT_PRE_NOTIF_IS_TYPE(notification, type);
        discarded_elems_notif = container_of(notification,
                        struct bt_notification_discarded_elements, parent);
-       return bt_get(discarded_elems_notif->begin_clock_value);
+       return discarded_elems_notif->begin_clock_value;
 }
 
 BT_HIDDEN
 struct bt_clock_value *
-bt_notification_discarded_elements_get_end_clock_value(
+bt_notification_discarded_elements_borrow_end_clock_value(
                enum bt_notification_type type,
                struct bt_notification *notification)
 {
@@ -126,7 +127,7 @@ bt_notification_discarded_elements_get_end_clock_value(
        BT_ASSERT_PRE_NOTIF_IS_TYPE(notification, type);
        discarded_elems_notif = container_of(notification,
                        struct bt_notification_discarded_elements, parent);
-       return bt_get(discarded_elems_notif->end_clock_value);
+       return discarded_elems_notif->end_clock_value;
 }
 
 BT_HIDDEN
@@ -144,7 +145,7 @@ int64_t bt_notification_discarded_elements_get_count(
 }
 
 BT_HIDDEN
-struct bt_stream *bt_notification_discarded_elements_get_stream(
+struct bt_stream *bt_notification_discarded_elements_borrow_stream(
                enum bt_notification_type type,
                struct bt_notification *notification)
 {
@@ -154,5 +155,5 @@ struct bt_stream *bt_notification_discarded_elements_get_stream(
        BT_ASSERT_PRE_NOTIF_IS_TYPE(notification, type);
        discarded_elems_notif = container_of(notification,
                        struct bt_notification_discarded_elements, parent);
-       return bt_get(discarded_elems_notif->stream);
+       return discarded_elems_notif->stream;
 }
This page took 0.025355 seconds and 4 git commands to generate.