fix: all functions have declarations (-Wmissing-prototypes -Wold-style-definition)
[lttng-ust.git] / liblttng-ust / rculfhash.c
index cd1c8ed0994c3db4fda7acaa9e1f9f1ca66172de..efdb5e70ef684d37dbad74af3df3d22820c10f1f 100644 (file)
 #include <sched.h>
 #include <unistd.h>
 
+#include <lttng/ust-arch.h>
 #include <lttng/urcu/pointer.h>
 #include <urcu/arch.h>
 #include <urcu/uatomic.h>
@@ -405,7 +406,7 @@ unsigned long bit_reverse_ulong(unsigned long v)
  * Returns 0 if no bit is set, else returns the position of the most
  * significant bit (from 1 to 32 on 32-bit, from 1 to 64 on 64-bit).
  */
-#if defined(__i386) || defined(__x86_64)
+#if defined(LTTNG_UST_ARCH_X86)
 static inline
 unsigned int fls_u32(uint32_t x)
 {
@@ -421,7 +422,7 @@ unsigned int fls_u32(uint32_t x)
 #define HAS_FLS_U32
 #endif
 
-#if defined(__x86_64)
+#if defined(LTTNG_UST_ARCH_AMD64)
 static inline
 unsigned int fls_u64(uint64_t x)
 {
@@ -438,7 +439,10 @@ unsigned int fls_u64(uint64_t x)
 #endif
 
 #ifndef HAS_FLS_U64
-static __attribute__((unused))
+static
+unsigned int fls_u64(uint64_t x)
+       __attribute__((unused));
+static
 unsigned int fls_u64(uint64_t x)
 {
        unsigned int r = 64;
@@ -475,7 +479,10 @@ unsigned int fls_u64(uint64_t x)
 #endif
 
 #ifndef HAS_FLS_U32
-static __attribute__((unused))
+static
+unsigned int fls_u32(uint32_t x)
+       __attribute__((unused));
+static
 unsigned int fls_u32(uint32_t x)
 {
        unsigned int r = 32;
This page took 0.02465 seconds and 4 git commands to generate.