{
struct bt_stream_class *stream_class;
- stream_class = bt_event_class_borrow_stream_class(event_class);
+ stream_class = bt_event_class_borrow_stream_class_inline(event_class);
BT_ASSERT(stream_class);
return bt_stream_class_borrow_trace_class(stream_class) != NULL;
}
BT_ASSERT_PRE_NON_NULL(msg, "Message");
BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_EVENT);
- BT_ASSERT(msg);
- stream_class = bt_event_class_borrow_stream_class(
+ stream_class = bt_event_class_borrow_stream_class_inline(
event_msg->event->class);
BT_ASSERT(stream_class);
BT_ASSERT_PRE(stream_class->default_clock_class,
*snapshot = event_msg->default_cs;
return BT_CLOCK_SNAPSHOT_STATE_KNOWN;
}
+
+const bt_clock_class *
+bt_message_event_borrow_stream_class_default_clock_class_const(
+ const bt_message *msg)
+{
+ struct bt_message_event *event_msg = (void *) msg;
+ struct bt_stream_class *stream_class;
+
+ BT_ASSERT_PRE_NON_NULL(msg, "Message");
+ BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_EVENT);
+ stream_class = bt_event_class_borrow_stream_class_inline(
+ event_msg->event->class);
+ BT_ASSERT(stream_class);
+ return stream_class->default_clock_class;
+}