Remove core.h
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 18 Nov 2011 18:56:30 +0000 (13:56 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 18 Nov 2011 18:56:30 +0000 (13:56 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
23 files changed:
include/Makefile.am
include/helper.h [new file with mode: 0644]
include/lttng/core.h [deleted file]
include/lttng/usterr-signal-safe.h
include/usterr.h
liblttng-ust/clock.h
liblttng-ust/ltt-context.c
liblttng-ust/ltt-events.c
liblttng-ust/ltt-probes.c
liblttng-ust/ltt-tracer-core.h
liblttng-ust/ltt-tracer.h
liblttng-ust/lttng-ust-abi.c
liblttng-ust/tracepoint.c
libringbuffer/backend.h
libringbuffer/backend_internal.h
libringbuffer/frontend_api.h
libringbuffer/frontend_types.h
libringbuffer/ring_buffer_backend.c
libringbuffer/ring_buffer_frontend.c
libringbuffer/shm.c
libringbuffer/shm.h
libringbuffer/smp.c
libringbuffer/smp.h

index 4a0a4ba6c83be593078210954d3ac638ae861f24..28462e60fc5f93061ee9ff5d86b2380435615927 100644 (file)
@@ -14,7 +14,6 @@ nobase_include_HEADERS = \
        lttng/config.h \
        lttng/share.h \
        lttng/ust.h \
-       lttng/core.h \
        lttng/ringbuffer-config.h \
        lttng/align.h \
        lttng/bug.h
@@ -25,4 +24,5 @@ noinst_HEADERS = \
        usterr.h \
        ust_snprintf.h \
        ust-comm.h \
-       lttng/bitfield.h
+       lttng/bitfield.h \
+       helper.h
diff --git a/include/helper.h b/include/helper.h
new file mode 100644 (file)
index 0000000..8aeb772
--- /dev/null
@@ -0,0 +1,44 @@
+#ifndef _LTTNG_UST_HELPER_H
+#define _LTTNG_UST_HELPER_H
+
+/*
+ * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1 of
+ * the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#include <stdlib.h>
+
+static inline
+void *zmalloc(size_t len)
+{
+       return calloc(len, 1);
+}
+
+#define max_t(type, x, y)                              \
+       ({                                              \
+               type __max1 = (x);                      \
+               type __max2 = (y);                      \
+               __max1 > __max2 ? __max1: __max2;       \
+       })
+
+#define min_t(type, x, y)                              \
+       ({                                              \
+               type __min1 = (x);                      \
+               type __min2 = (y);                      \
+               __min1 <= __min2 ? __min1: __min2;      \
+       })
+
+#endif /* _LTTNG_UST_HELPER_H */
diff --git a/include/lttng/core.h b/include/lttng/core.h
deleted file mode 100644 (file)
index 838cdb2..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef UST_CORE_H
-#define UST_CORE_H
-
-/*
- * Copyright (C) 2010  Pierre-Marc Fournier
- * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; version 2.1 of
- * the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
- */
-
-#include <sys/types.h>
-#include <lttng/config.h>
-#include <urcu/arch.h>
-#include <urcu/compiler.h>
-
-/* Min / Max */
-
-#define min_t(type, x, y) ({                    \
-       type __min1 = (x);                      \
-       type __min2 = (y);                      \
-       __min1 < __min2 ? __min1: __min2; })
-
-#define max_t(type, x, y) ({                    \
-       type __max1 = (x);                      \
-       type __max2 = (y);                      \
-       __max1 > __max2 ? __max1: __max2; })
-
-
-/* MALLOCATION */
-
-#include <stdlib.h>
-
-static inline
-void *zmalloc(size_t len)
-{
-       return calloc(1, len);
-}
-
-/* MATH */
-
-static inline unsigned int hweight32(unsigned int w)
-{
-       unsigned int res = w - ((w >> 1) & 0x55555555);
-       res = (res & 0x33333333) + ((res >> 2) & 0x33333333);
-       res = (res + (res >> 4)) & 0x0F0F0F0F;
-       res = res + (res >> 8);
-       return (res + (res >> 16)) & 0x000000FF;
-}
-
-#endif /* UST_CORE_H */
index 3e07d33b136eb1dc6975fbf9de512d5ee0e196ae..ab4c8a36a10da8471879e3b77564ee62f9021945 100644 (file)
@@ -27,7 +27,6 @@
 #include <stdarg.h>
 #include <stdio.h>
 
-#include <lttng/core.h>
 #include <lttng/share.h>
 
 enum ust_loglevel {
index fd5c80ae56475b40f46a067dc5be93010da5ad00..866e9a03b57f1b042e6fa513ae738bf87334e141 100644 (file)
@@ -27,7 +27,6 @@
 #include <stdarg.h>
 #include <stdio.h>
 
-#include <lttng/core.h>
 #include "lttng/share.h"
 
 enum ust_loglevel {
index 3de1fa81ec0a7704bafcd2aa55e44673ffd1d466..ed191b0bf9b7ca4b75a55ddbb17682e052b0ad4c 100644 (file)
@@ -24,7 +24,6 @@
 #include <sys/time.h>
 #include <stdint.h>
 #include <stddef.h>
-#include <lttng/core.h>
 
 /* TRACE CLOCK */
 
index 90747a5592f5e14a5322fb3485067acc1cfa5bdd..70578a26d993c3ab563e39234bc7f761e2c769ee 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <lttng/ust-events.h>
 #include <lttng/ust-tracer.h>
-#include <lttng/core.h>
+#include <helper.h>
 #include <string.h>
 #include <assert.h>
 
index 27f24d982ef59926997e511a822c3ff8d070110c..b67998c3ab310ca68a5ffae5dbb2ccb4cb2387ca 100644 (file)
@@ -24,7 +24,6 @@
 #include <sys/ipc.h>
 #include <lttng/ust-events.h>
 #include <lttng/usterr-signal-safe.h>
-#include "lttng/core.h"
 #include "ltt-tracer.h"
 #include "ltt-tracer-core.h"
 #include "wait.h"
@@ -33,6 +32,7 @@
 #include <stddef.h>
 #include <urcu/arch.h>
 #include "jhash.h"
+#include <helper.h>
 
 /*
  * The sessions mutex is the centralized mutex across UST tracing
index fda35bf994104f9dc2d6b27b24d4a86f15375ce4..9b25900d32219fc263c79d187316ab58335d9199 100644 (file)
@@ -11,7 +11,6 @@
 #include <string.h>
 #include <errno.h>
 #include <urcu/list.h>
-#include <lttng/core.h>
 #include <lttng/ust-events.h>
 #include <assert.h>
 
index 0a0bad9903b4b462a5b2597cf74467ff2eafb4c1..c54d620e62526f37e8a2b50dc9e412b6f1b8b333 100644 (file)
@@ -24,7 +24,6 @@
 #include <stdint.h>
 #include <stddef.h>
 #include <urcu/arch.h>
-#include <lttng/core.h>
 #include <lttng/ust-tracer.h>
 #include <urcu/list.h>
 #include <lttng/usterr-signal-safe.h>
index d51479cef7b11f3a7425a13638ff1b23fadbe84e..fb54e9cdfdc45ef761f7845f62e45396f5885c19 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <stdarg.h>
 #include <stdint.h>
-#include <lttng/core.h>
 #include <lttng/ust-events.h>
 #include "ltt-tracer-core.h"
 #include "compat.h"
index 6a568ba85690d77fcd351bc93c022a4c1a7f93d6..dbf533069f9b252a88327f91b5c6b106f2489983 100644 (file)
 #include <urcu/list.h>
 #include <lttng/ust-events.h>
 #include <lttng/usterr-signal-safe.h>
-#include "lttng/core.h"
 #include <lttng/ust-version.h>
 #include "ltt-tracer.h"
 #include "tracepoint-internal.h"
+#include <helper.h>
 
 struct ltt_tracepoint_list {
        struct tracepoint_iter iter;
index 2f8474f598237f6b9d62617de59f472e07f0fb4f..e62b11c73f23117c9275bed67bfbafc40f0d02f1 100644 (file)
@@ -29,6 +29,7 @@
 #include <urcu/hlist.h>
 #include <urcu/uatomic.h>
 #include <urcu/compiler.h>
+#include <helper.h>
 
 #include <lttng/usterr-signal-safe.h>
 #include "tracepoint-internal.h"
index 69c47ab69642d8ea3c8e0ba941423c09f7680b96..d4824d63fc713bb97451298e115edd34f87bab78 100644 (file)
@@ -16,8 +16,6 @@
 
 #include <unistd.h>
 
-#include "lttng/core.h"
-
 /* Internal helpers */
 #include "backend_internal.h"
 #include "frontend_internal.h"
index c4fb7604aa18bf9b3018551257dd3be61285b022..36d53dfd531357037501a539cd8c991c9d2ca4d9 100644 (file)
@@ -475,4 +475,20 @@ static inline int get_count_order(unsigned int count)
        return order;
 }
 
+static inline
+unsigned int hweight32(unsigned int value)
+{
+       unsigned int r;
+
+       r = value;
+       r = r - ((r >> 1) & 0x55555555);
+       r = (r & 0x33333333) + ((r >> 2) & 0x33333333);
+       r += r >> 4;
+       r &= 0x0F0F0F0F;
+       r += r >> 8;
+       r += r >> 16;
+       r &= 0x000000FF;
+       return r;
+}
+
 #endif /* _LINUX_RING_BUFFER_BACKEND_INTERNAL_H */
index d644a65b89ac5f63a2122c4e6198fd99d1827616..49f6e4c27274a32c2c59b05e414714b780770b9e 100644 (file)
@@ -18,7 +18,6 @@
  */
 
 #include "frontend.h"
-#include "lttng/core.h"
 #include <urcu-bp.h>
 #include <urcu/compiler.h>
 
index bccd5f85bcd8d1ecaea6964af1b802ced3139074..cb3b21cdc171b7c823d5ec6f0b32c6248e1442e7 100644 (file)
@@ -21,8 +21,6 @@
 #include <urcu/list.h>
 #include <urcu/uatomic.h>
 
-#include "lttng/core.h"
-
 #include <lttng/usterr-signal-safe.h>
 #include <lttng/ringbuffer-config.h>
 #include "backend_types.h"
index d676b5f8a77c22864f0b93aa3fc77243b665fca9..95346049f5b20f9f92d0cd9e3875b4a76e84b54b 100644 (file)
@@ -8,8 +8,6 @@
 
 #include <urcu/arch.h>
 
-#include "lttng/core.h"
-
 #include <lttng/ringbuffer-config.h>
 #include "vatomic.h"
 #include "backend.h"
index d469d04022d94e18379392189a6bd0ee55d5a4b0..7de1d60c8961df072704e9698cbbf2bbf7296296 100644 (file)
@@ -44,6 +44,7 @@
 #include <fcntl.h>
 #include <urcu/compiler.h>
 #include <urcu/ref.h>
+#include <helper.h>
 
 #include "smp.h"
 #include <lttng/ringbuffer-config.h>
index 781295beb718c69057fb9ba54e89916fba5ad00c..994204d1e0a2463829a8e73e3cb0cf078eae1c0f 100644 (file)
@@ -17,6 +17,7 @@
 #include <signal.h>
 #include <dirent.h>
 #include <lttng/align.h>
+#include <helper.h>
 
 struct shm_object_table *shm_object_table_create(size_t max_nb_obj)
 {
index e8fc8d70384910139306e0d2d0fbcfc41cbcb615..d102b8bf930c75ac40420a538f7cc13c0f5dab26 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <stdint.h>
 #include <lttng/usterr-signal-safe.h>
-#include "lttng/core.h"
+#include <urcu/compiler.h>
 #include "shm_types.h"
 
 /*
index f9dbd75a637ff86779f69abd645cd4421d6230fa..5b2aedba04c726b39766383629a894acf4e26f9b 100644 (file)
@@ -7,7 +7,6 @@
  */
 
 #include <unistd.h>
-#include "lttng/core.h"
 #include "usterr.h"
 #include <pthread.h>
 #include "smp.h"
index bef3e0ef7ff467c01e6937b70bcf3608eb9f51ac..034058e9ee54ea032420fa8153636071f83cf3cf 100644 (file)
@@ -9,7 +9,6 @@
  * Dual LGPL v2.1/GPL v2 license.
  */
 
-#include <lttng/core.h>
 #include "getcpu.h"
 
 /*
This page took 0.033499 seconds and 4 git commands to generate.