Namespace lttng/bug.h as lttng/ust-bug.h
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 17 Mar 2021 19:19:37 +0000 (15:19 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 17 Mar 2021 20:24:38 +0000 (16:24 -0400)
Since the 'lttng/' header directory is shared between ust and tools,
namespace this common name header with 'ust-' to match the same pattern
as the other files.

Change-Id: I08e853d9edcce218a9bd57717316a557f49200d7
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/Makefile.am
include/lttng/align.h
include/lttng/bug.h [deleted file]
include/lttng/ust-bug.h [new file with mode: 0644]
liblttng-ust/lttng-tracer-core.h

index 420ce3db171c1a8017d70b5ee3c338ce467a708b..a113bf1307354a5cd60f0ad6ea68ed1ac6a03f12 100644 (file)
@@ -23,7 +23,7 @@ nobase_include_HEADERS = \
        lttng/ust-endian.h \
        lttng/ringbuffer-context.h \
        lttng/align.h \
-       lttng/bug.h \
+       lttng/ust-bug.h \
        lttng/ust-error.h \
        lttng/tracef.h \
        lttng/lttng-ust-tracef.h \
index 6384a00a7c4d86acaf37b9a1e5e92aa4f54cec8e..fbe87f197a232f15575804cf41d15017c6bbec81 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef _LTTNG_ALIGN_H
 #define _LTTNG_ALIGN_H
 
-#include <lttng/bug.h>
+#include <lttng/ust-bug.h>
 
 /**
  * lttng_ust_offset_align - Calculate the offset needed to align an object on
diff --git a/include/lttng/bug.h b/include/lttng/bug.h
deleted file mode 100644 (file)
index c1a7c79..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * SPDX-License-Identifier: MIT
- *
- * Copyright (C) 2010-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_BUG_H
-#define _LTTNG_BUG_H
-
-#include <urcu/compiler.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define LTTNG_BUG_ON(condition)                                                \
-       do {                                                            \
-               if (caa_unlikely(condition)) {                          \
-                       fprintf(stderr,                                 \
-                               "LTTng BUG in file %s, line %d.\n",     \
-                               __FILE__, __LINE__);                    \
-                       exit(EXIT_FAILURE);                             \
-               }                                                       \
-       } while (0)
-
-#define LTTNG_BUILD_BUG_ON(condition)                                  \
-       ((void) sizeof(char[-!!(condition)]))
-
-/**
- * LTTNG_BUILD_RUNTIME_BUG_ON - check condition at build (if constant) or runtime
- * @condition: the condition which should be false.
- *
- * If the condition is a constant and true, the compiler will generate a build
- * error. If the condition is not constant, a BUG will be triggered at runtime
- * if the condition is ever true. If the condition is constant and false, no
- * code is emitted.
- */
-#define LTTNG_BUILD_RUNTIME_BUG_ON(condition)                  \
-       do {                                                    \
-               if (__builtin_constant_p(condition))            \
-                       LTTNG_BUILD_BUG_ON(condition);          \
-               else                                            \
-                       LTTNG_BUG_ON(condition);                \
-       } while (0)
-
-#endif
diff --git a/include/lttng/ust-bug.h b/include/lttng/ust-bug.h
new file mode 100644 (file)
index 0000000..0b388c1
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright (C) 2010-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef _LTTNG_UST_BUG_H
+#define _LTTNG_UST_BUG_H
+
+#include <urcu/compiler.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#define LTTNG_BUG_ON(condition)                                                \
+       do {                                                            \
+               if (caa_unlikely(condition)) {                          \
+                       fprintf(stderr,                                 \
+                               "LTTng BUG in file %s, line %d.\n",     \
+                               __FILE__, __LINE__);                    \
+                       exit(EXIT_FAILURE);                             \
+               }                                                       \
+       } while (0)
+
+#define LTTNG_BUILD_BUG_ON(condition)                                  \
+       ((void) sizeof(char[-!!(condition)]))
+
+/**
+ * LTTNG_BUILD_RUNTIME_BUG_ON - check condition at build (if constant) or runtime
+ * @condition: the condition which should be false.
+ *
+ * If the condition is a constant and true, the compiler will generate a build
+ * error. If the condition is not constant, a BUG will be triggered at runtime
+ * if the condition is ever true. If the condition is constant and false, no
+ * code is emitted.
+ */
+#define LTTNG_BUILD_RUNTIME_BUG_ON(condition)                  \
+       do {                                                    \
+               if (__builtin_constant_p(condition))            \
+                       LTTNG_BUILD_BUG_ON(condition);          \
+               else                                            \
+                       LTTNG_BUG_ON(condition);                \
+       } while (0)
+
+#endif
index 2ab8bc7c9c255cef02e2da6669b2513603836313..a292dae578e6628ccb31dc43781f012d4c850a60 100644 (file)
@@ -13,7 +13,6 @@
 #include <urcu/arch.h>
 #include <urcu/list.h>
 #include <lttng/ust-tracer.h>
-#include <lttng/bug.h>
 #include <lttng/ringbuffer-context.h>
 #include <usterr-signal-safe.h>
 
This page took 0.027696 seconds and 4 git commands to generate.