Namespace lttng/align.h as lttng/ust-align.h
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 17 Mar 2021 19:27:10 +0000 (15:27 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 17 Mar 2021 20:25:31 +0000 (16:25 -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: Iad25ad76b75e87e040b4d7dd9f461ce6522ac361
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/Makefile.am
include/lttng/align.h [deleted file]
include/lttng/ringbuffer-context.h
include/lttng/ust-align.h [new file with mode: 0644]
libcounter/shm.c
liblttng-ust/lttng-bytecode-specialize.c
liblttng-ust/lttng-ust-elf.c
libringbuffer/ring_buffer_backend.c
libringbuffer/ring_buffer_frontend.c
libringbuffer/ringbuffer-config.h
libringbuffer/shm.c

index a113bf1307354a5cd60f0ad6ea68ed1ac6a03f12..80b32785d4baa85e4a41fa48ee050a26e3c86cba 100644 (file)
@@ -22,7 +22,7 @@ nobase_include_HEADERS = \
        lttng/ust.h \
        lttng/ust-endian.h \
        lttng/ringbuffer-context.h \
-       lttng/align.h \
+       lttng/ust-align.h \
        lttng/ust-bug.h \
        lttng/ust-error.h \
        lttng/tracef.h \
diff --git a/include/lttng/align.h b/include/lttng/align.h
deleted file mode 100644 (file)
index fbe87f1..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * SPDX-License-Identifier: MIT
- *
- * Copyright (C) 2010-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_ALIGN_H
-#define _LTTNG_ALIGN_H
-
-#include <lttng/ust-bug.h>
-
-/**
- * lttng_ust_offset_align - Calculate the offset needed to align an object on
- *                its natural alignment towards higher addresses.
- * @align_drift:  object offset from an "alignment"-aligned address.
- * @alignment:    natural object alignment. Must be non-zero, power of 2.
- *
- * Returns the offset that must be added to align towards higher
- * addresses.
- */
-#define lttng_ust_offset_align(align_drift, alignment)                        \
-       ({                                                                     \
-               LTTNG_BUILD_RUNTIME_BUG_ON((alignment) == 0                    \
-                                  || ((alignment) & ((alignment) - 1)));      \
-               (((alignment) - (align_drift)) & ((alignment) - 1));           \
-       })
-
-/**
- * lttng_ust_offset_align_floor - Calculate the offset needed to align an
- *                object on its natural alignment towards lower addresses.
- * @align_drift:  object offset from an "alignment"-aligned address.
- * @alignment:    natural object alignment. Must be non-zero, power of 2.
- *
- * Returns the offset that must be substracted to align towards lower addresses.
- */
-#define lttng_ust_offset_align_floor(align_drift, alignment)                  \
-       ({                                                                     \
-               LTTNG_BUILD_RUNTIME_BUG_ON((alignment) == 0                    \
-                                  || ((alignment) & ((alignment) - 1)));      \
-               (((align_drift) - (alignment)) & ((alignment) - 1));           \
-       })
-
-#endif /* _LTTNG_ALIGN_H */
index 614150da2668406c43ce7df2c348ca137fc071f7..e42c3f52e128f3b591e5547e50d9ade32c4287e2 100644 (file)
 #define _LTTNG_RING_BUFFER_CONTEXT_H
 
 #include <errno.h>
-#include <lttng/ust-tracer.h>
 #include <stdint.h>
 #include <stddef.h>
 #include <urcu/arch.h>
 #include <string.h>
-#include <lttng/align.h>
+
+#include <lttng/ust-tracer.h>
+#include <lttng/ust-align.h>
 #include <lttng/ust-compiler.h>
 
 struct lttng_ust_lib_ring_buffer;
diff --git a/include/lttng/ust-align.h b/include/lttng/ust-align.h
new file mode 100644 (file)
index 0000000..00da854
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright (C) 2010-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ */
+
+#ifndef _LTTNG_UST_ALIGN_H
+#define _LTTNG_UST_ALIGN_H
+
+#include <lttng/ust-bug.h>
+
+/**
+ * lttng_ust_offset_align - Calculate the offset needed to align an object on
+ *                its natural alignment towards higher addresses.
+ * @align_drift:  object offset from an "alignment"-aligned address.
+ * @alignment:    natural object alignment. Must be non-zero, power of 2.
+ *
+ * Returns the offset that must be added to align towards higher
+ * addresses.
+ */
+#define lttng_ust_offset_align(align_drift, alignment)                        \
+       ({                                                                     \
+               LTTNG_BUILD_RUNTIME_BUG_ON((alignment) == 0                    \
+                                  || ((alignment) & ((alignment) - 1)));      \
+               (((alignment) - (align_drift)) & ((alignment) - 1));           \
+       })
+
+/**
+ * lttng_ust_offset_align_floor - Calculate the offset needed to align an
+ *                object on its natural alignment towards lower addresses.
+ * @align_drift:  object offset from an "alignment"-aligned address.
+ * @alignment:    natural object alignment. Must be non-zero, power of 2.
+ *
+ * Returns the offset that must be substracted to align towards lower addresses.
+ */
+#define lttng_ust_offset_align_floor(align_drift, alignment)                  \
+       ({                                                                     \
+               LTTNG_BUILD_RUNTIME_BUG_ON((alignment) == 0                    \
+                                  || ((alignment) & ((alignment) - 1)));      \
+               (((align_drift) - (alignment)) & ((alignment) - 1));           \
+       })
+
+#endif /* _LTTNG_UST_ALIGN_H */
index 1689ad45bbf490713a36ac75776705e4531d87a6..d9bccafcf6d3eaeccfb7cb977d775a520f6e0155 100644 (file)
 #include <stdio.h>
 #include <signal.h>
 #include <dirent.h>
-#include <lttng/align.h>
 #include <limits.h>
 #include <stdbool.h>
 #include <stdint.h>
+
 #ifdef HAVE_LIBNUMA
 #include <numa.h>
 #include <numaif.h>
 #endif
+
+#include <lttng/ust-align.h>
+
 #include <ust-helper.h>
 #include <ust-fd.h>
 #include "../libringbuffer/mmap.h"
index cb7480b3f9ccef3ac514c8b6a686dcf61a8d9dd6..28b0ea721381eb63c70f602c22184edcef4a779c 100644 (file)
@@ -10,7 +10,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
-#include <lttng/align.h>
+#include <lttng/ust-align.h>
 
 #include "context-internal.h"
 #include "lttng-bytecode.h"
index ebc231e0d80b2f27d2b2a88cf0c112050578b569..8a02ceb38a4d8e16fbef35ef321b9559f15c9518 100644 (file)
@@ -6,9 +6,6 @@
 
 #define _LGPL_SOURCE
 #include <fcntl.h>
-#include <ust-helper.h>
-#include <lttng/align.h>
-#include <ust-elf.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <string.h>
@@ -16,6 +13,9 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#include <lttng/ust-align.h>
+
+#include <ust-elf.h>
 #include <ust-fd.h>
 
 #include "lttng-tracer-core.h"
index f1f3489835555d923951c4df1d30eb46f41eb2fe..264201883862daae95f622f8f8f62193ac43ad90 100644 (file)
@@ -11,8 +11,9 @@
 #include <urcu/arch.h>
 #include <limits.h>
 
-#include <lttng/align.h>
+#include <lttng/ust-align.h>
 #include <lttng/ringbuffer-context.h>
+
 #include "ringbuffer-config.h"
 #include "vatomic.h"
 #include "backend.h"
index 45ff7deeace46c64dc550dfdb08a1cdfb69f357d..23122865dfe4b4360da35a46438658881d9946ec 100644 (file)
 #include <poll.h>
 #include <ust-helper.h>
 
-#include <lttng/align.h>
-#include "smp.h"
+#include <lttng/ust-align.h>
 #include <lttng/ringbuffer-context.h>
+
+#include "smp.h"
 #include "ringbuffer-config.h"
 #include "vatomic.h"
 #include "backend.h"
index 1052ed6f7c563bbc11b2662648d30493be765eeb..0d33ace253ead62e70923d2de28a6fdc629817ea 100644 (file)
 #define _LTTNG_RING_BUFFER_CONFIG_H
 
 #include <errno.h>
-#include <lttng/ust-tracer.h>
 #include <stdint.h>
 #include <stddef.h>
 #include <urcu/arch.h>
 #include <string.h>
-#include <lttng/align.h>
+
+#include <lttng/ust-align.h>
 #include <lttng/ust-compiler.h>
+#include <lttng/ust-tracer.h>
 
 struct lttng_ust_lib_ring_buffer;
 struct lttng_ust_lib_ring_buffer_channel;
index 580504681acc649ef013610cbe26b16967bfc068..6f5c9f5fd4763fad9b72d5a4c0dfbf8449e7f8ea 100644 (file)
 #include <stdio.h>
 #include <signal.h>
 #include <dirent.h>
-#include <lttng/align.h>
 #include <limits.h>
 #include <stdbool.h>
 #include <stdint.h>
+
 #ifdef HAVE_LIBNUMA
 #include <numa.h>
 #include <numaif.h>
 #endif
+
+#include <lttng/ust-align.h>
+
 #include <ust-helper.h>
 #include <ust-fd.h>
 #include "mmap.h"
This page took 0.03076 seconds and 4 git commands to generate.