#include <stdint.h>
#include <stddef.h>
-#include <stdbool.h>
-#include <assert.h>
+#include <babeltrace/assert-internal.h>
#include <babeltrace/ctf-ir/clock-class.h>
#include <babeltrace/object-internal.h>
+#include <babeltrace/types.h>
#include <glib.h>
struct bt_clock_class_priority_map {
struct bt_object base;
- /* Array of struct bt_ctf_clock_class *, owned by this */
+ /* Array of struct bt_clock_class *, owned by this */
GPtrArray *entries;
- /* struct bt_ctf_clock_class * (weak) to priority (uint64_t) */
+ /* struct bt_clock_class * (weak) to priority (uint64_t *) */
GHashTable *prios;
/* Clock class (weak) with the currently highest priority */
- struct bt_ctf_clock_class *highest_prio_cc;
+ struct bt_clock_class *highest_prio_cc;
- bool frozen;
+ bt_bool frozen;
};
static inline
-void bt_clock_class_priority_map_freeze(
+void _bt_clock_class_priority_map_freeze(
struct bt_clock_class_priority_map *cc_prio_map)
{
- assert(cc_prio_map);
- cc_prio_map->frozen = true;
+ BT_ASSERT(cc_prio_map);
+ cc_prio_map->frozen = BT_TRUE;
}
+#ifdef BT_DEV_MODE
+# define bt_clock_class_priority_map_freeze _bt_clock_class_priority_map_freeze
+#else
+# define bt_clock_class_priority_map_freeze(_cc_prio_map)
+#endif /* BT_DEV_MODE */
+
#endif /* BABELTRACE_GRAPH_CLOCK_CLASS_PRIORITY_MAP_INTERNAL_H */