lib: add internal object pool API and use it; adapt plugins/tests
[babeltrace.git] / lib / graph / notification / packet.c
index 0bbfa8ea1ebb45e1da30f45b851473d66dd2a608..fb590c3c512c9611fc8c68c722ab77456af44f9f 100644 (file)
@@ -74,7 +74,7 @@ struct bt_notification *bt_notification_packet_begin_create(
        BT_ASSERT_PRE_NON_NULL(packet, "Packet");
        stream = bt_packet_borrow_stream(packet);
        BT_ASSERT(stream);
-       stream_class = bt_stream_borrow_stream_class(stream);
+       stream_class = bt_stream_borrow_class(stream);
        BT_ASSERT(stream_class);
        BT_LOGD("Creating packet beginning notification object: "
                "packet-addr=%p, stream-addr=%p, stream-name=\"%s\", "
@@ -107,7 +107,7 @@ error:
        return NULL;
 }
 
-struct bt_packet *bt_notification_packet_begin_get_packet(
+struct bt_packet *bt_notification_packet_begin_borrow_packet(
                struct bt_notification *notification)
 {
        struct bt_notification_packet_begin *packet_begin;
@@ -117,7 +117,7 @@ struct bt_packet *bt_notification_packet_begin_get_packet(
                BT_NOTIFICATION_TYPE_PACKET_BEGIN);
        packet_begin = container_of(notification,
                        struct bt_notification_packet_begin, parent);
-       return bt_get(packet_begin->packet);
+       return packet_begin->packet;
 }
 
 struct bt_notification *bt_notification_packet_end_create(
@@ -130,7 +130,7 @@ struct bt_notification *bt_notification_packet_end_create(
        BT_ASSERT_PRE_NON_NULL(packet, "Packet");
        stream = bt_packet_borrow_stream(packet);
        BT_ASSERT(stream);
-       stream_class = bt_stream_borrow_stream_class(stream);
+       stream_class = bt_stream_borrow_class(stream);
        BT_ASSERT(stream_class);
        BT_LOGD("Creating packet end notification object: "
                "packet-addr=%p, stream-addr=%p, stream-name=\"%s\", "
@@ -163,7 +163,7 @@ error:
        return NULL;
 }
 
-struct bt_packet *bt_notification_packet_end_get_packet(
+struct bt_packet *bt_notification_packet_end_borrow_packet(
                struct bt_notification *notification)
 {
        struct bt_notification_packet_end *packet_end;
@@ -173,5 +173,5 @@ struct bt_packet *bt_notification_packet_end_get_packet(
                BT_NOTIFICATION_TYPE_PACKET_END);
        packet_end = container_of(notification,
                        struct bt_notification_packet_end, parent);
-       return bt_get(packet_end->packet);
+       return packet_end->packet;
 }
This page took 0.026625 seconds and 4 git commands to generate.