X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=include%2Fbabeltrace%2Fgraph%2Fnotification-packet-internal.h;h=18f6db954355aa3efeb8f0afc8c4c423e0fdaf08;hb=56e18c4ce186892c36d7f2cb5078087425e60134;hp=7164d55baf07349f09df45143118387005f8d3eb;hpb=50842bdc4c21f3de2b63e29cdac730af8b6dcca6;p=babeltrace.git diff --git a/include/babeltrace/graph/notification-packet-internal.h b/include/babeltrace/graph/notification-packet-internal.h index 7164d55b..18f6db95 100644 --- a/include/babeltrace/graph/notification-packet-internal.h +++ b/include/babeltrace/graph/notification-packet-internal.h @@ -1,5 +1,5 @@ -#ifndef BABELTRACE_COMPONENT_NOTIFICATION_PACKET_INTERNAL_H -#define BABELTRACE_COMPONENT_NOTIFICATION_PACKET_INTERNAL_H +#ifndef BABELTRACE_GRAPH_NOTIFICATION_PACKET_INTERNAL_H +#define BABELTRACE_GRAPH_NOTIFICATION_PACKET_INTERNAL_H /* * BabelTrace - Packet-related Notifications @@ -28,8 +28,9 @@ */ #include -#include +#include #include +#include struct bt_notification_packet_begin { struct bt_notification parent; @@ -41,28 +42,22 @@ struct bt_notification_packet_end { struct bt_packet *packet; }; -static inline -struct bt_packet *bt_notification_packet_begin_borrow_packet( - struct bt_notification *notif) -{ - struct bt_notification_packet_begin *notif_packet_begin = - container_of(notif, - struct bt_notification_packet_begin, parent); +BT_HIDDEN +struct bt_notification *bt_notification_packet_begin_new( + struct bt_graph *graph); +BT_HIDDEN +void bt_notification_packet_begin_recycle(struct bt_notification *notif); - assert(notif_packet_begin); - return notif_packet_begin->packet; -} +BT_HIDDEN +void bt_notification_packet_begin_destroy(struct bt_notification *notif); -static inline -struct bt_packet *bt_notification_packet_end_borrow_packet( - struct bt_notification *notif) -{ - struct bt_notification_packet_end *notif_packet_end = - container_of(notif, - struct bt_notification_packet_end, parent); +BT_HIDDEN +struct bt_notification *bt_notification_packet_end_new(struct bt_graph *graph); - assert(notif_packet_end); - return notif_packet_end->packet; -} +BT_HIDDEN +void bt_notification_packet_end_recycle(struct bt_notification *notif); -#endif /* BABELTRACE_COMPONENT_NOTIFICATION_PACKET_INTERNAL_H */ +BT_HIDDEN +void bt_notification_packet_end_destroy(struct bt_notification *notif); + +#endif /* BABELTRACE_GRAPH_NOTIFICATION_PACKET_INTERNAL_H */