Clock snapshot API: use status
[babeltrace.git] / lib / graph / message / inactivity.c
index f61f1fdcaf0bf9b698f58850856001fdc8ac3e9d..7a766677b3dea5d6f5d6167b3d7c828427a486bd 100644 (file)
@@ -99,13 +99,15 @@ void bt_message_inactivity_set_default_clock_snapshot(
                "%![msg-]+n, value=%" PRIu64, msg, value_cycles);
 }
 
-const struct bt_clock_snapshot *
+extern enum bt_clock_snapshot_state
 bt_message_inactivity_borrow_default_clock_snapshot_const(
-               const struct bt_message *msg)
+               const bt_message *msg, const bt_clock_snapshot **snapshot)
 {
        struct bt_message_inactivity *inactivity = (void *) msg;
 
        BT_ASSERT_PRE_NON_NULL(msg, "Message");
+       BT_ASSERT_PRE_NON_NULL(snapshot, "Clock snapshot (output)");
        BT_ASSERT_PRE_MSG_IS_TYPE(msg, BT_MESSAGE_TYPE_INACTIVITY);
-       return inactivity->default_cs;
+       *snapshot = inactivity->default_cs;
+       return BT_CLOCK_SNAPSHOT_STATE_KNOWN;
 }
This page took 0.023263 seconds and 4 git commands to generate.