- struct bt_clock_class_priority_map *cc_prio_map = NULL;
- struct bt_notification_inactivity *inactivity_notification;
-
- if (bt_notification_get_type(notification) !=
- BT_NOTIFICATION_TYPE_INACTIVITY) {
- goto end;
- }
-
- inactivity_notification = container_of(notification,
- struct bt_notification_inactivity, parent);
- cc_prio_map = bt_get(inactivity_notification->cc_prio_map);
-end:
- return cc_prio_map;
-}
-
-struct bt_ctf_clock_value *bt_notification_inactivity_get_clock_value(
- struct bt_notification *notification,
- struct bt_ctf_clock_class *clock_class)
-{
- struct bt_ctf_clock_value *clock_value = NULL;
- struct bt_notification_inactivity *inactivity_notification;
-
- if (!notification || !clock_class) {
- goto end;
- }
-
- if (bt_notification_get_type(notification) !=
- BT_NOTIFICATION_TYPE_INACTIVITY) {
- goto end;
- }
-
- inactivity_notification = container_of(notification,
- struct bt_notification_inactivity, parent);
- clock_value = g_hash_table_lookup(inactivity_notification->clock_values,
- clock_class);
- bt_get(clock_value);
-
-end:
- return clock_value;
+ struct bt_notification_inactivity *inactivity = (void *) notif;
+
+ BT_ASSERT_PRE_NON_NULL(notif, "Notification");
+ BT_ASSERT_PRE_NOTIF_IS_TYPE(notif, BT_NOTIFICATION_TYPE_INACTIVITY);
+ BT_ASSERT_PRE_HOT(notif, "Notification", ": %!+n", notif);
+ bt_clock_value_set_value_inline(inactivity->default_cv, value_cycles);
+ BT_LIB_LOGV("Set inactivity notification's default clock value: "
+ "%![notif-]+n, value=%" PRIu64, notif, value_cycles);