This header only defines static inline utils functions, make it private.
Change-Id: I88bb29532bfb24e7e418ddec1e410850df3480b2
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng/ust-getcpu.h \
lttng/ust-elf.h \
lttng/counter-config.h \
- lttng/bitmap.h \
lttng/urcu/pointer.h \
lttng/urcu/urcu-ust.h \
lttng/urcu/static/pointer.h \
noinst_HEADERS = \
usterr-signal-safe.h \
ust-snprintf.h \
+ ust-bitmap.h \
ust-comm.h \
ust-fd.h \
ust-tid.h \
+++ /dev/null
-/*
- * SPDX-License-Identifier: MIT
- *
- * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * LTTng Bitmap API
- */
-
-#ifndef _LTTNG_BITMAP_H
-#define _LTTNG_BITMAP_H
-
-#include <urcu/compiler.h>
-#include <urcu/system.h>
-#include <urcu/uatomic.h>
-#include <stdbool.h>
-
-static inline void lttng_bitmap_index(unsigned int index, unsigned int *word,
- unsigned int *bit)
-{
- *word = index / CAA_BITS_PER_LONG;
- *bit = index % CAA_BITS_PER_LONG;
-}
-
-static inline void lttng_bitmap_set_bit(unsigned int index, unsigned long *p)
-{
- unsigned int word, bit;
- unsigned long val;
-
- lttng_bitmap_index(index, &word, &bit);
- val = 1U << bit;
- uatomic_or(p + word, val);
-}
-
-static inline void lttng_bitmap_clear_bit(unsigned int index, unsigned long *p)
-{
- unsigned int word, bit;
- unsigned long val;
-
- lttng_bitmap_index(index, &word, &bit);
- val = ~(1U << bit);
- uatomic_and(p + word, val);
-}
-
-static inline bool lttng_bitmap_test_bit(unsigned int index, unsigned long *p)
-{
- unsigned int word, bit;
-
- lttng_bitmap_index(index, &word, &bit);
- return (CMM_LOAD_SHARED(p[word]) >> bit) & 0x1;
-}
-
-#endif /* _LTTNG_BITMAP_H */
--- /dev/null
+/*
+ * SPDX-License-Identifier: MIT
+ *
+ * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * LTTng Bitmap API
+ */
+
+#ifndef _LTTNG_BITMAP_H
+#define _LTTNG_BITMAP_H
+
+#include <urcu/compiler.h>
+#include <urcu/system.h>
+#include <urcu/uatomic.h>
+#include <stdbool.h>
+
+static inline void lttng_bitmap_index(unsigned int index, unsigned int *word,
+ unsigned int *bit)
+{
+ *word = index / CAA_BITS_PER_LONG;
+ *bit = index % CAA_BITS_PER_LONG;
+}
+
+static inline void lttng_bitmap_set_bit(unsigned int index, unsigned long *p)
+{
+ unsigned int word, bit;
+ unsigned long val;
+
+ lttng_bitmap_index(index, &word, &bit);
+ val = 1U << bit;
+ uatomic_or(p + word, val);
+}
+
+static inline void lttng_bitmap_clear_bit(unsigned int index, unsigned long *p)
+{
+ unsigned int word, bit;
+ unsigned long val;
+
+ lttng_bitmap_index(index, &word, &bit);
+ val = ~(1U << bit);
+ uatomic_and(p + word, val);
+}
+
+static inline bool lttng_bitmap_test_bit(unsigned int index, unsigned long *p)
+{
+ unsigned int word, bit;
+
+ lttng_bitmap_index(index, &word, &bit);
+ return (CMM_LOAD_SHARED(p[word]) >> bit) & 0x1;
+}
+
+#endif /* _LTTNG_BITMAP_H */
#include "counter-internal.h"
#include <urcu/compiler.h>
#include <urcu/uatomic.h>
-#include <lttng/bitmap.h>
+#include "ust-bitmap.h"
#include "../libringbuffer/getcpu.h"
/*
#include <errno.h>
#include "counter.h"
#include "counter-internal.h"
-#include <lttng/bitmap.h>
#include <urcu/system.h>
#include <urcu/compiler.h>
#include <stdbool.h>
#include "smp.h"
#include "shm.h"
+#include "ust-bitmap.h"
+
static size_t lttng_counter_get_dimension_nr_elements(struct lib_counter_dimension *dimension)
{
return dimension->max_nr_elem;