lib: use common precond. assert. macros from `assert-cond.h` thru lib
[babeltrace.git] / src / lib / trace-ir / clock-snapshot.h
index 5375f3ab333fec53af7d904d08c268f8511ee8b2..29de3b96e09a229a1e8b5e3d9533f19df4e60942 100644 (file)
@@ -1,29 +1,13 @@
-#ifndef BABELTRACE_TRACE_IR_CLOCK_SNAPSHOT_INTERNAL_H
-#define BABELTRACE_TRACE_IR_CLOCK_SNAPSHOT_INTERNAL_H
-
 /*
- * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
+ * SPDX-License-Identifier: MIT
  *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com>
  */
 
-#include "common/babeltrace.h"
+#ifndef BABELTRACE_TRACE_IR_CLOCK_SNAPSHOT_INTERNAL_H
+#define BABELTRACE_TRACE_IR_CLOCK_SNAPSHOT_INTERNAL_H
+
+#include "common/macros.h"
 #include "lib/object.h"
 #include <stdbool.h>
 #include <stdint.h>
@@ -45,14 +29,14 @@ struct bt_clock_snapshot {
 static inline
 void bt_clock_snapshot_set(struct bt_clock_snapshot *clock_snapshot)
 {
-       BT_ASSERT(clock_snapshot);
+       BT_ASSERT_DBG(clock_snapshot);
        clock_snapshot->is_set = true;
 }
 
 static inline
 void bt_clock_snapshot_reset(struct bt_clock_snapshot *clock_snapshot)
 {
-       BT_ASSERT(clock_snapshot);
+       BT_ASSERT_DBG(clock_snapshot);
        clock_snapshot->is_set = false;
 }
 
@@ -70,7 +54,7 @@ static inline
 void bt_clock_snapshot_set_raw_value(struct bt_clock_snapshot *clock_snapshot,
                uint64_t cycles)
 {
-       BT_ASSERT(clock_snapshot);
+       BT_ASSERT_DBG(clock_snapshot);
        clock_snapshot->value_cycles = cycles;
        set_ns_from_origin(clock_snapshot);
        bt_clock_snapshot_set(clock_snapshot);
This page took 0.025267 seconds and 4 git commands to generate.