From: Philippe Proulx Date: Fri, 7 Dec 2018 20:46:36 +0000 (-0500) Subject: lib: rename "begin" to "beginning" when used as a noun X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=bb5bb16080ef123c91a690eb267a8d83bd4fb199 lib: rename "begin" to "beginning" when used as a noun Signed-off-by: Philippe Proulx --- diff --git a/include/babeltrace/graph/const-notification.h b/include/babeltrace/graph/const-notification.h index 44c50d3c..a8347a3d 100644 --- a/include/babeltrace/graph/const-notification.h +++ b/include/babeltrace/graph/const-notification.h @@ -39,9 +39,9 @@ typedef struct bt_notification **bt_notification_array; enum bt_notification_type { BT_NOTIFICATION_TYPE_EVENT = 0, BT_NOTIFICATION_TYPE_INACTIVITY = 1, - BT_NOTIFICATION_TYPE_STREAM_BEGIN = 2, + BT_NOTIFICATION_TYPE_STREAM_BEGINNING = 2, BT_NOTIFICATION_TYPE_STREAM_END = 3, - BT_NOTIFICATION_TYPE_PACKET_BEGIN = 4, + BT_NOTIFICATION_TYPE_PACKET_BEGINNING = 4, BT_NOTIFICATION_TYPE_PACKET_END = 5, }; diff --git a/include/babeltrace/graph/graph-internal.h b/include/babeltrace/graph/graph-internal.h index cb2da872..c1c018d0 100644 --- a/include/babeltrace/graph/graph-internal.h +++ b/include/babeltrace/graph/graph-internal.h @@ -94,7 +94,7 @@ struct bt_graph { /* Pool of `struct bt_notification_event *` */ struct bt_object_pool event_notif_pool; - /* Pool of `struct bt_notification_packet_begin *` */ + /* Pool of `struct bt_notification_packet_beginning *` */ struct bt_object_pool packet_begin_notif_pool; /* Pool of `struct bt_notification_packet_end *` */ diff --git a/include/babeltrace/graph/notification-const.h b/include/babeltrace/graph/notification-const.h index 4ab0bb91..ed8cb841 100644 --- a/include/babeltrace/graph/notification-const.h +++ b/include/babeltrace/graph/notification-const.h @@ -39,9 +39,9 @@ typedef const struct bt_notification **bt_notification_array_const; enum bt_notification_type { BT_NOTIFICATION_TYPE_EVENT = 0, BT_NOTIFICATION_TYPE_INACTIVITY = 1, - BT_NOTIFICATION_TYPE_STREAM_BEGIN = 2, + BT_NOTIFICATION_TYPE_STREAM_BEGINNING = 2, BT_NOTIFICATION_TYPE_STREAM_END = 3, - BT_NOTIFICATION_TYPE_PACKET_BEGIN = 4, + BT_NOTIFICATION_TYPE_PACKET_BEGINNING = 4, BT_NOTIFICATION_TYPE_PACKET_END = 5, }; diff --git a/include/babeltrace/graph/notification-internal.h b/include/babeltrace/graph/notification-internal.h index 4ef04290..cdd21469 100644 --- a/include/babeltrace/graph/notification-internal.h +++ b/include/babeltrace/graph/notification-internal.h @@ -119,12 +119,12 @@ const char *bt_notification_type_string(enum bt_notification_type type) return "BT_NOTIFICATION_TYPE_EVENT"; case BT_NOTIFICATION_TYPE_INACTIVITY: return "BT_NOTIFICATION_TYPE_INACTIVITY"; - case BT_NOTIFICATION_TYPE_STREAM_BEGIN: - return "BT_NOTIFICATION_TYPE_STREAM_BEGIN"; + case BT_NOTIFICATION_TYPE_STREAM_BEGINNING: + return "BT_NOTIFICATION_TYPE_STREAM_BEGINNING"; case BT_NOTIFICATION_TYPE_STREAM_END: return "BT_NOTIFICATION_TYPE_STREAM_END"; - case BT_NOTIFICATION_TYPE_PACKET_BEGIN: - return "BT_NOTIFICATION_TYPE_PACKET_BEGIN"; + case BT_NOTIFICATION_TYPE_PACKET_BEGINNING: + return "BT_NOTIFICATION_TYPE_PACKET_BEGINNING"; case BT_NOTIFICATION_TYPE_PACKET_END: return "BT_NOTIFICATION_TYPE_PACKET_END"; default: diff --git a/include/babeltrace/graph/notification-packet-const.h b/include/babeltrace/graph/notification-packet-const.h index aa75c2f2..83fd5607 100644 --- a/include/babeltrace/graph/notification-packet-const.h +++ b/include/babeltrace/graph/notification-packet-const.h @@ -32,7 +32,7 @@ extern "C" { struct bt_notification; struct bt_packet; -extern const struct bt_packet *bt_notification_packet_begin_borrow_packet_const( +extern const struct bt_packet *bt_notification_packet_beginning_borrow_packet_const( const struct bt_notification *notification); extern const struct bt_packet *bt_notification_packet_end_borrow_packet_const( diff --git a/include/babeltrace/graph/notification-packet-internal.h b/include/babeltrace/graph/notification-packet-internal.h index 77cdf979..95e6cb40 100644 --- a/include/babeltrace/graph/notification-packet-internal.h +++ b/include/babeltrace/graph/notification-packet-internal.h @@ -30,7 +30,7 @@ #include #include -struct bt_notification_packet_begin { +struct bt_notification_packet_beginning { struct bt_notification parent; struct bt_packet *packet; }; @@ -41,13 +41,13 @@ struct bt_notification_packet_end { }; BT_HIDDEN -struct bt_notification *bt_notification_packet_begin_new( +struct bt_notification *bt_notification_packet_beginning_new( struct bt_graph *graph); BT_HIDDEN -void bt_notification_packet_begin_recycle(struct bt_notification *notif); +void bt_notification_packet_beginning_recycle(struct bt_notification *notif); BT_HIDDEN -void bt_notification_packet_begin_destroy(struct bt_notification *notif); +void bt_notification_packet_beginning_destroy(struct bt_notification *notif); BT_HIDDEN struct bt_notification *bt_notification_packet_end_new(struct bt_graph *graph); diff --git a/include/babeltrace/graph/notification-packet.h b/include/babeltrace/graph/notification-packet.h index b56e9e7a..ac293baa 100644 --- a/include/babeltrace/graph/notification-packet.h +++ b/include/babeltrace/graph/notification-packet.h @@ -34,7 +34,7 @@ struct bt_self_notification_iterator; struct bt_packet; extern -struct bt_notification *bt_notification_packet_begin_create( +struct bt_notification *bt_notification_packet_beginning_create( struct bt_self_notification_iterator *notification_iterator, struct bt_packet *packet); @@ -43,7 +43,7 @@ struct bt_notification *bt_notification_packet_end_create( struct bt_self_notification_iterator *notification_iterator, struct bt_packet *packet); -extern struct bt_packet *bt_notification_packet_begin_borrow_packet( +extern struct bt_packet *bt_notification_packet_beginning_borrow_packet( struct bt_notification *notification); extern struct bt_packet *bt_notification_packet_end_borrow_packet( diff --git a/include/babeltrace/graph/notification-stream-const.h b/include/babeltrace/graph/notification-stream-const.h index f0fd960c..d04c0820 100644 --- a/include/babeltrace/graph/notification-stream-const.h +++ b/include/babeltrace/graph/notification-stream-const.h @@ -34,11 +34,11 @@ struct bt_self_notification_iterator; struct bt_clock_value; struct bt_stream; -extern const struct bt_stream *bt_notification_stream_begin_borrow_stream_const( +extern const struct bt_stream *bt_notification_stream_beginning_borrow_stream_const( const struct bt_notification *notification); extern const struct bt_clock_value * -bt_notification_stream_begin_borrow_default_clock_value_const( +bt_notification_stream_beginning_borrow_default_clock_value_const( const struct bt_notification *notif); extern const struct bt_stream *bt_notification_stream_end_borrow_stream_const( diff --git a/include/babeltrace/graph/notification-stream-internal.h b/include/babeltrace/graph/notification-stream-internal.h index 4b4e0c7c..bad744e8 100644 --- a/include/babeltrace/graph/notification-stream-internal.h +++ b/include/babeltrace/graph/notification-stream-internal.h @@ -31,7 +31,7 @@ #include #include -struct bt_notification_stream_begin { +struct bt_notification_stream_beginning { struct bt_notification parent; struct bt_stream *stream; struct bt_clock_value *default_cv; diff --git a/include/babeltrace/graph/notification-stream.h b/include/babeltrace/graph/notification-stream.h index 2f98f82f..537beca6 100644 --- a/include/babeltrace/graph/notification-stream.h +++ b/include/babeltrace/graph/notification-stream.h @@ -36,7 +36,7 @@ struct bt_self_notification_iterator; struct bt_stream; extern -struct bt_notification *bt_notification_stream_begin_create( +struct bt_notification *bt_notification_stream_beginning_create( struct bt_self_notification_iterator *notification_iterator, struct bt_stream *stream); @@ -45,10 +45,10 @@ struct bt_notification *bt_notification_stream_end_create( struct bt_self_notification_iterator *notification_iterator, struct bt_stream *stream); -extern struct bt_stream *bt_notification_stream_begin_borrow_stream( +extern struct bt_stream *bt_notification_stream_beginning_borrow_stream( struct bt_notification *notification); -extern void bt_notification_stream_begin_set_default_clock_value( +extern void bt_notification_stream_beginning_set_default_clock_value( struct bt_notification *notif, uint64_t value_cycles); extern struct bt_stream *bt_notification_stream_end_borrow_stream( diff --git a/lib/graph/graph.c b/lib/graph/graph.c index 3ba2321e..db88e333 100644 --- a/lib/graph/graph.c +++ b/lib/graph/graph.c @@ -293,7 +293,7 @@ static void destroy_notification_packet_begin(struct bt_notification *notif, struct bt_graph *graph) { - bt_notification_packet_begin_destroy(notif); + bt_notification_packet_beginning_destroy(notif); } static @@ -464,7 +464,7 @@ struct bt_graph *bt_graph_create(void) } ret = bt_object_pool_initialize(&graph->packet_begin_notif_pool, - (bt_object_pool_new_object_func) bt_notification_packet_begin_new, + (bt_object_pool_new_object_func) bt_notification_packet_beginning_new, (bt_object_pool_destroy_object_func) destroy_notification_packet_begin, graph); if (ret) { diff --git a/lib/graph/iterator.c b/lib/graph/iterator.c index 56b68804..54ce07dc 100644 --- a/lib/graph/iterator.c +++ b/lib/graph/iterator.c @@ -471,14 +471,14 @@ void bt_notification_borrow_packet_stream(const struct bt_notification *notif, bt_notification_event_borrow_event_const(notif)); *stream = bt_packet_borrow_stream_const(*packet); break; - case BT_NOTIFICATION_TYPE_STREAM_BEGIN: - *stream = bt_notification_stream_begin_borrow_stream_const(notif); + case BT_NOTIFICATION_TYPE_STREAM_BEGINNING: + *stream = bt_notification_stream_beginning_borrow_stream_const(notif); break; case BT_NOTIFICATION_TYPE_STREAM_END: *stream = bt_notification_stream_end_borrow_stream_const(notif); break; - case BT_NOTIFICATION_TYPE_PACKET_BEGIN: - *packet = bt_notification_packet_begin_borrow_packet_const(notif); + case BT_NOTIFICATION_TYPE_PACKET_BEGINNING: + *packet = bt_notification_packet_beginning_borrow_packet_const(notif); *stream = bt_packet_borrow_stream_const(*packet); break; case BT_NOTIFICATION_TYPE_PACKET_END: @@ -514,12 +514,12 @@ bool validate_notification( if (!stream_state) { /* * No stream state for this stream: this notification - * MUST be a BT_NOTIFICATION_TYPE_STREAM_BEGIN notification + * MUST be a BT_NOTIFICATION_TYPE_STREAM_BEGINNING notification * and its sequence number must be 0. */ - if (c_notif->type != BT_NOTIFICATION_TYPE_STREAM_BEGIN) { + if (c_notif->type != BT_NOTIFICATION_TYPE_STREAM_BEGINNING) { BT_ASSERT_PRE_MSG("Unexpected notification: missing a " - "BT_NOTIFICATION_TYPE_STREAM_BEGIN " + "BT_NOTIFICATION_TYPE_STREAM_BEGINNING " "notification prior to this notification: " "%![stream-]+s", stream); is_valid = false; @@ -582,8 +582,8 @@ bool validate_notification( } switch (c_notif->type) { - case BT_NOTIFICATION_TYPE_STREAM_BEGIN: - BT_ASSERT_PRE_MSG("Unexpected BT_NOTIFICATION_TYPE_STREAM_BEGIN " + case BT_NOTIFICATION_TYPE_STREAM_BEGINNING: + BT_ASSERT_PRE_MSG("Unexpected BT_NOTIFICATION_TYPE_STREAM_BEGINNING " "notification at this point: notif-seq-num=%" PRIu64 ", " "%![stream-]+s", c_notif->seq_num, stream); is_valid = false; @@ -602,9 +602,9 @@ bool validate_notification( stream_state->expected_notif_seq_num++; stream_state->is_ended = true; goto end; - case BT_NOTIFICATION_TYPE_PACKET_BEGIN: + case BT_NOTIFICATION_TYPE_PACKET_BEGINNING: if (stream_state->cur_packet) { - BT_ASSERT_PRE_MSG("Unexpected BT_NOTIFICATION_TYPE_PACKET_BEGIN " + BT_ASSERT_PRE_MSG("Unexpected BT_NOTIFICATION_TYPE_PACKET_BEGINNING " "notification at this point: missing a " "BT_NOTIFICATION_TYPE_PACKET_END notification " "prior to this notification: " @@ -622,7 +622,7 @@ bool validate_notification( if (!stream_state->cur_packet) { BT_ASSERT_PRE_MSG("Unexpected BT_NOTIFICATION_TYPE_PACKET_END " "notification at this point: missing a " - "BT_NOTIFICATION_TYPE_PACKET_BEGIN notification " + "BT_NOTIFICATION_TYPE_PACKET_BEGINNING notification " "prior to this notification: " "notif-seq-num=%" PRIu64 ", %![stream-]+s, " "%![packet-]+a", c_notif->seq_num, stream, diff --git a/lib/graph/notification/packet.c b/lib/graph/notification/packet.c index a1750764..c753f61c 100644 --- a/lib/graph/notification/packet.c +++ b/lib/graph/notification/packet.c @@ -42,19 +42,19 @@ #include BT_HIDDEN -struct bt_notification *bt_notification_packet_begin_new(struct bt_graph *graph) +struct bt_notification *bt_notification_packet_beginning_new(struct bt_graph *graph) { - struct bt_notification_packet_begin *notification; + struct bt_notification_packet_beginning *notification; - notification = g_new0(struct bt_notification_packet_begin, 1); + notification = g_new0(struct bt_notification_packet_beginning, 1); if (!notification) { BT_LOGE_STR("Failed to allocate one packet beginning notification."); goto error; } bt_notification_init(¬ification->parent, - BT_NOTIFICATION_TYPE_PACKET_BEGIN, - (bt_object_release_func) bt_notification_packet_begin_recycle, + BT_NOTIFICATION_TYPE_PACKET_BEGINNING, + (bt_object_release_func) bt_notification_packet_beginning_recycle, graph); goto end; @@ -65,13 +65,13 @@ end: return (void *) notification; } -struct bt_notification *bt_notification_packet_begin_create( +struct bt_notification *bt_notification_packet_beginning_create( struct bt_self_notification_iterator *self_notif_iter, struct bt_packet *packet) { struct bt_self_component_port_input_notification_iterator *notif_iter = (void *) self_notif_iter; - struct bt_notification_packet_begin *notification = NULL; + struct bt_notification_packet_beginning *notification = NULL; struct bt_stream *stream; struct bt_stream_class *stream_class; @@ -106,9 +106,9 @@ end: } BT_HIDDEN -void bt_notification_packet_begin_destroy(struct bt_notification *notif) +void bt_notification_packet_beginning_destroy(struct bt_notification *notif) { - struct bt_notification_packet_begin *packet_begin_notif = (void *) notif; + struct bt_notification_packet_beginning *packet_begin_notif = (void *) notif; BT_LIB_LOGD("Destroying packet beginning notification: %!+n", notif); BT_LIB_LOGD("Putting packet: %!+a", packet_begin_notif->packet); @@ -117,15 +117,15 @@ void bt_notification_packet_begin_destroy(struct bt_notification *notif) } BT_HIDDEN -void bt_notification_packet_begin_recycle(struct bt_notification *notif) +void bt_notification_packet_beginning_recycle(struct bt_notification *notif) { - struct bt_notification_packet_begin *packet_begin_notif = (void *) notif; + struct bt_notification_packet_beginning *packet_begin_notif = (void *) notif; struct bt_graph *graph; BT_ASSERT(packet_begin_notif); if (unlikely(!notif->graph)) { - bt_notification_packet_begin_destroy(notif); + bt_notification_packet_beginning_destroy(notif); return; } @@ -138,22 +138,22 @@ void bt_notification_packet_begin_recycle(struct bt_notification *notif) bt_object_pool_recycle_object(&graph->packet_begin_notif_pool, notif); } -struct bt_packet *bt_notification_packet_begin_borrow_packet( +struct bt_packet *bt_notification_packet_beginning_borrow_packet( struct bt_notification *notification) { - struct bt_notification_packet_begin *packet_begin; + struct bt_notification_packet_beginning *packet_begin; BT_ASSERT_PRE_NON_NULL(notification, "Notification"); BT_ASSERT_PRE_NOTIF_IS_TYPE(notification, - BT_NOTIFICATION_TYPE_PACKET_BEGIN); + BT_NOTIFICATION_TYPE_PACKET_BEGINNING); packet_begin = (void *) notification; return packet_begin->packet; } -const struct bt_packet *bt_notification_packet_begin_borrow_packet_const( +const struct bt_packet *bt_notification_packet_beginning_borrow_packet_const( const struct bt_notification *notification) { - return bt_notification_packet_begin_borrow_packet( + return bt_notification_packet_beginning_borrow_packet( (void *) notification); } diff --git a/lib/graph/notification/stream.c b/lib/graph/notification/stream.c index 92336b27..b824b15d 100644 --- a/lib/graph/notification/stream.c +++ b/lib/graph/notification/stream.c @@ -140,10 +140,10 @@ struct bt_clock_value *bt_notification_stream_end_borrow_default_clock_value( } static -void bt_notification_stream_begin_destroy(struct bt_object *obj) +void bt_notification_stream_beginning_destroy(struct bt_object *obj) { - struct bt_notification_stream_begin *notification = - (struct bt_notification_stream_begin *) obj; + struct bt_notification_stream_beginning *notification = + (struct bt_notification_stream_beginning *) obj; BT_LIB_LOGD("Destroying stream beginning notification: %!+n", notification); @@ -158,11 +158,11 @@ void bt_notification_stream_begin_destroy(struct bt_object *obj) g_free(notification); } -struct bt_notification *bt_notification_stream_begin_create( +struct bt_notification *bt_notification_stream_beginning_create( struct bt_self_notification_iterator *self_notif_iter, struct bt_stream *stream) { - struct bt_notification_stream_begin *notification; + struct bt_notification_stream_beginning *notification; struct bt_stream_class *stream_class; BT_ASSERT_PRE_NON_NULL(self_notif_iter, "Notification iterator"); @@ -171,15 +171,15 @@ struct bt_notification *bt_notification_stream_begin_create( BT_ASSERT(stream_class); BT_LIB_LOGD("Creating stream beginning notification object: " "%![stream-]+s, %![sc-]+S", stream, stream_class); - notification = g_new0(struct bt_notification_stream_begin, 1); + notification = g_new0(struct bt_notification_stream_beginning, 1); if (!notification) { BT_LOGE_STR("Failed to allocate one stream beginning notification."); goto error; } bt_notification_init(¬ification->parent, - BT_NOTIFICATION_TYPE_STREAM_BEGIN, - bt_notification_stream_begin_destroy, NULL); + BT_NOTIFICATION_TYPE_STREAM_BEGINNING, + bt_notification_stream_beginning_destroy, NULL); notification->stream = stream; bt_object_get_no_null_check(notification->stream); BT_LIB_LOGD("Created stream beginning notification object: " @@ -190,34 +190,34 @@ error: return NULL; } -struct bt_stream *bt_notification_stream_begin_borrow_stream( +struct bt_stream *bt_notification_stream_beginning_borrow_stream( struct bt_notification *notification) { - struct bt_notification_stream_begin *stream_begin; + struct bt_notification_stream_beginning *stream_begin; BT_ASSERT_PRE_NON_NULL(notification, "Notification"); BT_ASSERT_PRE_NOTIF_IS_TYPE(notification, - BT_NOTIFICATION_TYPE_STREAM_BEGIN); + BT_NOTIFICATION_TYPE_STREAM_BEGINNING); stream_begin = (void *) notification; return stream_begin->stream; } -const struct bt_stream *bt_notification_stream_begin_borrow_stream_const( +const struct bt_stream *bt_notification_stream_beginning_borrow_stream_const( const struct bt_notification *notification) { - return bt_notification_stream_begin_borrow_stream( + return bt_notification_stream_beginning_borrow_stream( (void *) notification); } -void bt_notification_stream_begin_set_default_clock_value( +void bt_notification_stream_beginning_set_default_clock_value( struct bt_notification *notif, uint64_t value_cycles) { - struct bt_notification_stream_begin *sb_notif = (void *) notif; + struct bt_notification_stream_beginning *sb_notif = (void *) notif; BT_ASSERT_PRE_NON_NULL(notif, "Notification"); BT_ASSERT_PRE_HOT(notif, "Notification", ": %!+n", notif); - BT_ASSERT_PRE_NOTIF_IS_TYPE(notif, BT_NOTIFICATION_TYPE_STREAM_BEGIN); + BT_ASSERT_PRE_NOTIF_IS_TYPE(notif, BT_NOTIFICATION_TYPE_STREAM_BEGINNING); BT_ASSERT_PRE(sb_notif->stream->class->default_clock_class, "Notification's stream class has no default clock class: " "%![notif-]+n, %![sc-]+S", notif, sb_notif->stream->class); @@ -231,12 +231,12 @@ void bt_notification_stream_begin_set_default_clock_value( "value=%" PRIu64, value_cycles); } -struct bt_clock_value *bt_notification_stream_begin_borrow_default_clock_value( +struct bt_clock_value *bt_notification_stream_beginning_borrow_default_clock_value( struct bt_notification *notif) { - struct bt_notification_stream_begin *stream_begin = (void *) notif; + struct bt_notification_stream_beginning *stream_begin = (void *) notif; BT_ASSERT_PRE_NON_NULL(notif, "Notification"); - BT_ASSERT_PRE_NOTIF_IS_TYPE(notif, BT_NOTIFICATION_TYPE_STREAM_BEGIN); + BT_ASSERT_PRE_NOTIF_IS_TYPE(notif, BT_NOTIFICATION_TYPE_STREAM_BEGINNING); return stream_begin->default_cv; } diff --git a/lib/lib-logging.c b/lib/lib-logging.c index a72cdd98..d58996b0 100644 --- a/lib/lib-logging.c +++ b/lib/lib-logging.c @@ -926,9 +926,9 @@ static inline void format_notification(char **buf_ch, bool extended, break; } - case BT_NOTIFICATION_TYPE_STREAM_BEGIN: + case BT_NOTIFICATION_TYPE_STREAM_BEGINNING: { - const struct bt_notification_stream_begin *notif_stream = + const struct bt_notification_stream_beginning *notif_stream = (const void *) notif; if (notif_stream->stream) { @@ -950,9 +950,9 @@ static inline void format_notification(char **buf_ch, bool extended, break; } - case BT_NOTIFICATION_TYPE_PACKET_BEGIN: + case BT_NOTIFICATION_TYPE_PACKET_BEGINNING: { - const struct bt_notification_packet_begin *notif_packet = + const struct bt_notification_packet_beginning *notif_packet = (const void *) notif; if (notif_packet->packet) { diff --git a/plugins/ctf/common/notif-iter/notif-iter.c b/plugins/ctf/common/notif-iter/notif-iter.c index a8028b33..501c3004 100644 --- a/plugins/ctf/common/notif-iter/notif-iter.c +++ b/plugins/ctf/common/notif-iter/notif-iter.c @@ -2274,7 +2274,7 @@ void notify_new_stream(struct bt_notif_iter *notit, BT_ASSERT(notit->stream); BT_ASSERT(notit->notif_iter); - ret = bt_notification_stream_begin_create(notit->notif_iter, + ret = bt_notification_stream_beginning_create(notit->notif_iter, notit->stream); if (!ret) { BT_LOGE("Cannot create stream beginning notification: " @@ -2392,7 +2392,7 @@ void notify_new_packet(struct bt_notif_iter *notit, } BT_ASSERT(notit->notif_iter); - notif = bt_notification_packet_begin_create(notit->notif_iter, + notif = bt_notification_packet_beginning_create(notit->notif_iter, notit->packet); if (!notif) { BT_LOGE("Cannot create packet beginning notification: " diff --git a/plugins/ctf/common/notif-iter/notif-iter.h b/plugins/ctf/common/notif-iter/notif-iter.h index 9fd9b725..9c3033a1 100644 --- a/plugins/ctf/common/notif-iter/notif-iter.h +++ b/plugins/ctf/common/notif-iter/notif-iter.h @@ -352,7 +352,7 @@ off_t bt_notif_iter_get_current_packet_size( * Resets the iterator so that the next requested medium bytes are * assumed to be the first bytes of a new stream. The first notification * which this iterator emits after calling bt_notif_iter_reset() is a - * BT_NOTIFICATION_TYPE_STREAM_BEGIN one. + * BT_NOTIFICATION_TYPE_STREAM_BEGINNING one. */ BT_HIDDEN void bt_notif_iter_reset(struct bt_notif_iter *notit); diff --git a/plugins/ctf/fs-sink/writer.c b/plugins/ctf/fs-sink/writer.c index 8f2ffd8a..7ff45840 100644 --- a/plugins/ctf/fs-sink/writer.c +++ b/plugins/ctf/fs-sink/writer.c @@ -121,10 +121,10 @@ enum bt_component_status handle_notification( } switch (bt_notification_get_type(notification)) { - case BT_NOTIFICATION_TYPE_PACKET_BEGIN: + case BT_NOTIFICATION_TYPE_PACKET_BEGINNING: { const struct bt_packet *packet = - bt_notification_packet_begin_get_packet(notification); + bt_notification_packet_beginning_get_packet(notification); if (!packet) { ret = BT_COMPONENT_STATUS_ERROR; @@ -164,10 +164,10 @@ enum bt_component_status handle_notification( } break; } - case BT_NOTIFICATION_TYPE_STREAM_BEGIN: + case BT_NOTIFICATION_TYPE_STREAM_BEGINNING: { const struct bt_stream *stream = - bt_notification_stream_begin_get_stream(notification); + bt_notification_stream_beginning_get_stream(notification); if (!stream) { ret = BT_COMPONENT_STATUS_ERROR; diff --git a/plugins/ctf/fs-src/fs.c b/plugins/ctf/fs-src/fs.c index 8de14bdc..7241e732 100644 --- a/plugins/ctf/fs-src/fs.c +++ b/plugins/ctf/fs-src/fs.c @@ -102,11 +102,11 @@ enum bt_self_notification_iterator_status ctf_fs_iterator_next_one( if (status == BT_SELF_NOTIFICATION_ITERATOR_STATUS_OK && bt_notification_get_type(*notif) == - BT_NOTIFICATION_TYPE_STREAM_BEGIN) { + BT_NOTIFICATION_TYPE_STREAM_BEGINNING) { if (notif_iter_data->skip_stream_begin_notifs) { /* * We already emitted a - * BT_NOTIFICATION_TYPE_STREAM_BEGIN + * BT_NOTIFICATION_TYPE_STREAM_BEGINNING * notification: skip this one, get a new one. */ BT_OBJECT_PUT_REF_AND_RESET(*notif); @@ -117,7 +117,7 @@ enum bt_self_notification_iterator_status ctf_fs_iterator_next_one( goto end; } else { /* - * First BT_NOTIFICATION_TYPE_STREAM_BEGIN + * First BT_NOTIFICATION_TYPE_STREAM_BEGINNING * notification: skip all following. */ notif_iter_data->skip_stream_begin_notifs = true; @@ -162,15 +162,15 @@ enum bt_self_notification_iterator_status ctf_fs_iterator_next_one( /* * If we get a notification, we expect to get a - * BT_NOTIFICATION_TYPE_STREAM_BEGIN notification + * BT_NOTIFICATION_TYPE_STREAM_BEGINNING notification * because the iterator's state machine emits one before * even requesting the first block of data from the * medium. Skip this notification because we're not * really starting a new stream here, and try getting a * new notification (which, if it works, is a - * BT_NOTIFICATION_TYPE_PACKET_BEGIN one). We're sure to + * BT_NOTIFICATION_TYPE_PACKET_BEGINNING one). We're sure to * get at least one pair of - * BT_NOTIFICATION_TYPE_PACKET_BEGIN and + * BT_NOTIFICATION_TYPE_PACKET_BEGINNING and * BT_NOTIFICATION_TYPE_PACKET_END notifications in the * case of a single, empty packet. We know there's at * least one packet because the stream file group does @@ -180,7 +180,7 @@ enum bt_self_notification_iterator_status ctf_fs_iterator_next_one( if (status == BT_SELF_NOTIFICATION_ITERATOR_STATUS_OK) { BT_ASSERT(bt_notification_get_type(*notif) == - BT_NOTIFICATION_TYPE_STREAM_BEGIN); + BT_NOTIFICATION_TYPE_STREAM_BEGINNING); BT_OBJECT_PUT_REF_AND_RESET(*notif); status = ctf_fs_ds_file_next(notif_iter_data->ds_file, &priv_notif); diff --git a/plugins/ctf/fs-src/fs.h b/plugins/ctf/fs-src/fs.h index 3542f58a..5619e1b2 100644 --- a/plugins/ctf/fs-src/fs.h +++ b/plugins/ctf/fs-src/fs.h @@ -150,7 +150,7 @@ struct ctf_fs_notif_iter_data { /* Owned by this */ struct bt_notif_iter *notif_iter; - /* True to skip BT_NOTIFICATION_TYPE_STREAM_BEGIN notifications */ + /* True to skip BT_NOTIFICATION_TYPE_STREAM_BEGINNING notifications */ bool skip_stream_begin_notifs; }; diff --git a/plugins/lttng-utils/plugin.c b/plugins/lttng-utils/plugin.c index c3b24f3f..e3ebc514 100644 --- a/plugins/lttng-utils/plugin.c +++ b/plugins/lttng-utils/plugin.c @@ -112,10 +112,10 @@ const struct bt_notification *handle_notification(FILE *err, const struct bt_notification *new_notification = NULL; switch (bt_notification_get_type(notification)) { - case BT_NOTIFICATION_TYPE_PACKET_BEGIN: + case BT_NOTIFICATION_TYPE_PACKET_BEGINNING: { const struct bt_packet *packet = - bt_notification_packet_begin_get_packet(notification); + bt_notification_packet_beginning_get_packet(notification); const struct bt_packet *writer_packet; if (!packet) { @@ -124,7 +124,7 @@ const struct bt_notification *handle_notification(FILE *err, writer_packet = debug_info_new_packet(debug_it, packet); BT_ASSERT(writer_packet); - new_notification = bt_notification_packet_begin_create( + new_notification = bt_notification_packet_beginning_create( writer_packet); BT_ASSERT(new_notification); bt_object_put_ref(packet); @@ -172,10 +172,10 @@ const struct bt_notification *handle_notification(FILE *err, bt_object_put_ref(writer_event); break; } - case BT_NOTIFICATION_TYPE_STREAM_BEGIN: + case BT_NOTIFICATION_TYPE_STREAM_BEGINNING: { const struct bt_stream *stream = - bt_notification_stream_begin_get_stream(notification); + bt_notification_stream_beginning_get_stream(notification); const struct bt_stream *writer_stream; if (!stream) { @@ -184,7 +184,7 @@ const struct bt_notification *handle_notification(FILE *err, writer_stream = debug_info_stream_begin(debug_it, stream); BT_ASSERT(writer_stream); - new_notification = bt_notification_stream_begin_create( + new_notification = bt_notification_stream_beginning_create( writer_stream); BT_ASSERT(new_notification); bt_object_put_ref(stream); diff --git a/plugins/text/dmesg/dmesg.c b/plugins/text/dmesg/dmesg.c index 0f5b1599..4da898bd 100644 --- a/plugins/text/dmesg/dmesg.c +++ b/plugins/text/dmesg/dmesg.c @@ -768,13 +768,13 @@ handle_state: switch (dmesg_notif_iter->state) { case STATE_EMIT_STREAM_BEGINNING: BT_ASSERT(dmesg_notif_iter->tmp_event_notif); - *notif = bt_notification_stream_begin_create( + *notif = bt_notification_stream_beginning_create( dmesg_notif_iter->pc_notif_iter, dmesg_comp->stream); dmesg_notif_iter->state = STATE_EMIT_PACKET_BEGINNING; break; case STATE_EMIT_PACKET_BEGINNING: BT_ASSERT(dmesg_notif_iter->tmp_event_notif); - *notif = bt_notification_packet_begin_create( + *notif = bt_notification_packet_beginning_create( dmesg_notif_iter->pc_notif_iter, dmesg_comp->packet); dmesg_notif_iter->state = STATE_EMIT_EVENT; break; diff --git a/plugins/text/pretty/pretty.c b/plugins/text/pretty/pretty.c index dcf1b5f7..ae064c5e 100644 --- a/plugins/text/pretty/pretty.c +++ b/plugins/text/pretty/pretty.c @@ -130,7 +130,7 @@ enum bt_self_component_status handle_notification( BT_ASSERT(pretty); switch (bt_notification_get_type(notification)) { - case BT_NOTIFICATION_TYPE_PACKET_BEGIN: + case BT_NOTIFICATION_TYPE_PACKET_BEGINNING: if (pretty_print_packet(pretty, notification)) { ret = BT_SELF_COMPONENT_STATUS_ERROR; } diff --git a/plugins/text/pretty/print.c b/plugins/text/pretty/print.c index 46e3236d..5f312219 100644 --- a/plugins/text/pretty/print.c +++ b/plugins/text/pretty/print.c @@ -1373,7 +1373,7 @@ int pretty_print_packet(struct pretty_component *pretty, const struct bt_notification *packet_beginning_notif) { #if 0 - const struct bt_packet *packet = bt_notification_packet_begin_borrow_packet_const( + const struct bt_packet *packet = bt_notification_packet_beginning_borrow_packet_const( packet_beginning_notif); uint64_t count; int status = 0; diff --git a/plugins/utils/counter/counter.c b/plugins/utils/counter/counter.c index 3b24092c..3da0fb90 100644 --- a/plugins/utils/counter/counter.c +++ b/plugins/utils/counter/counter.c @@ -245,13 +245,13 @@ enum bt_self_component_status counter_consume( case BT_NOTIFICATION_TYPE_INACTIVITY: counter->count.inactivity++; break; - case BT_NOTIFICATION_TYPE_STREAM_BEGIN: + case BT_NOTIFICATION_TYPE_STREAM_BEGINNING: counter->count.stream_begin++; break; case BT_NOTIFICATION_TYPE_STREAM_END: counter->count.stream_end++; break; - case BT_NOTIFICATION_TYPE_PACKET_BEGIN: + case BT_NOTIFICATION_TYPE_PACKET_BEGINNING: counter->count.packet_begin++; break; case BT_NOTIFICATION_TYPE_PACKET_END: diff --git a/plugins/utils/trimmer/iterator.c b/plugins/utils/trimmer/iterator.c index 0ea086e4..c0503d25 100644 --- a/plugins/utils/trimmer/iterator.c +++ b/plugins/utils/trimmer/iterator.c @@ -392,8 +392,8 @@ const struct bt_notification *evaluate_packet_notification( bool lazy_update = false; switch (bt_notification_get_type(notification)) { - case BT_NOTIFICATION_TYPE_PACKET_BEGIN: - packet = bt_notification_packet_begin_get_packet(notification); + case BT_NOTIFICATION_TYPE_PACKET_BEGINNING: + packet = bt_notification_packet_beginning_get_packet(notification); BT_ASSERT(packet); writer_packet = trimmer_new_packet(trim_it, packet); BT_ASSERT(writer_packet); @@ -479,8 +479,8 @@ const struct bt_notification *evaluate_packet_notification( end: switch (bt_notification_get_type(notification)) { - case BT_NOTIFICATION_TYPE_PACKET_BEGIN: - new_notification = bt_notification_packet_begin_create(writer_packet); + case BT_NOTIFICATION_TYPE_PACKET_BEGINNING: + new_notification = bt_notification_packet_beginning_create(writer_packet); BT_ASSERT(new_notification); break; case BT_NOTIFICATION_TYPE_PACKET_END: @@ -533,7 +533,7 @@ enum bt_notification_iterator_status evaluate_notification( new_notification = evaluate_event_notification(*notification, trim_it, begin, end, in_range, &finished); break; - case BT_NOTIFICATION_TYPE_PACKET_BEGIN: + case BT_NOTIFICATION_TYPE_PACKET_BEGINNING: case BT_NOTIFICATION_TYPE_PACKET_END: new_notification = evaluate_packet_notification(*notification, trim_it, begin, end, in_range, &finished); diff --git a/tests/lib/test_bt_notification_iterator.c b/tests/lib/test_bt_notification_iterator.c index 5455b960..f121df05 100644 --- a/tests/lib/test_bt_notification_iterator.c +++ b/tests/lib/test_bt_notification_iterator.c @@ -345,11 +345,11 @@ void src_iter_next_seq_one(struct bt_self_notification_iterator* notif_iter, switch (user_data->seq[user_data->at]) { case SEQ_STREAM1_BEGIN: - *notif = bt_notification_stream_begin_create(notif_iter, + *notif = bt_notification_stream_beginning_create(notif_iter, src_stream1); break; case SEQ_STREAM2_BEGIN: - *notif = bt_notification_stream_begin_create(notif_iter, + *notif = bt_notification_stream_beginning_create(notif_iter, src_stream2); break; case SEQ_STREAM1_END: @@ -361,19 +361,19 @@ void src_iter_next_seq_one(struct bt_self_notification_iterator* notif_iter, src_stream2); break; case SEQ_STREAM1_PACKET1_BEGIN: - *notif = bt_notification_packet_begin_create(notif_iter, + *notif = bt_notification_packet_beginning_create(notif_iter, src_stream1_packet1); break; case SEQ_STREAM1_PACKET2_BEGIN: - *notif = bt_notification_packet_begin_create(notif_iter, + *notif = bt_notification_packet_beginning_create(notif_iter, src_stream1_packet2); break; case SEQ_STREAM2_PACKET1_BEGIN: - *notif = bt_notification_packet_begin_create(notif_iter, + *notif = bt_notification_packet_beginning_create(notif_iter, src_stream2_packet1); break; case SEQ_STREAM2_PACKET2_BEGIN: - *notif = bt_notification_packet_begin_create(notif_iter, + *notif = bt_notification_packet_beginning_create(notif_iter, src_stream2_packet2); break; case SEQ_STREAM1_PACKET1_END: @@ -497,10 +497,10 @@ void append_test_events_from_notification(const struct bt_notification *notifica BT_ASSERT(test_event.packet); break; } - case BT_NOTIFICATION_TYPE_STREAM_BEGIN: + case BT_NOTIFICATION_TYPE_STREAM_BEGINNING: test_event.type = TEST_EV_TYPE_NOTIF_STREAM_BEGIN; test_event.stream = - bt_notification_stream_begin_borrow_stream_const(notification); + bt_notification_stream_beginning_borrow_stream_const(notification); BT_ASSERT(test_event.stream); break; case BT_NOTIFICATION_TYPE_STREAM_END: @@ -509,10 +509,10 @@ void append_test_events_from_notification(const struct bt_notification *notifica bt_notification_stream_end_borrow_stream_const(notification); BT_ASSERT(test_event.stream); break; - case BT_NOTIFICATION_TYPE_PACKET_BEGIN: + case BT_NOTIFICATION_TYPE_PACKET_BEGINNING: test_event.type = TEST_EV_TYPE_NOTIF_PACKET_BEGIN; test_event.packet = - bt_notification_packet_begin_borrow_packet_const(notification); + bt_notification_packet_beginning_borrow_packet_const(notification); BT_ASSERT(test_event.packet); break; case BT_NOTIFICATION_TYPE_PACKET_END: