Fix: handle sys_futex() FUTEX_WAIT interrupted by signal
[urcu.git] / rculfhash-internal.h
index a8a1ce42f1af1620f62aa7df9161ea68c5c05b14..d7cec95a10e286f4693c91925e61441146196ebe 100644 (file)
  */
 
 #include <urcu/rculfhash.h>
+#include <stdio.h>
 
 #ifdef DEBUG
 #define dbg_printf(fmt, args...)     printf("[debug rculfhash] " fmt, ## args)
 #else
-#define dbg_printf(fmt, args...)
+#define dbg_printf(fmt, args...)                               \
+do {                                                           \
+       /* do nothing but check printf format */                \
+       if (0)                                                  \
+               printf("[debug rculfhash] " fmt, ## args);      \
+} while (0)
 #endif
 
 #if (CAA_BITS_PER_LONG == 32)
@@ -137,8 +143,8 @@ struct cds_lfht {
         */
 };
 
-extern unsigned int fls_ulong(unsigned long x);
-extern int get_count_order_ulong(unsigned long x);
+extern unsigned int cds_lfht_fls_ulong(unsigned long x);
+extern int cds_lfht_get_count_order_ulong(unsigned long x);
 
 #ifdef POISON_FREE
 #define poison_free(ptr)                                       \
@@ -168,7 +174,7 @@ struct cds_lfht *__default_alloc_cds_lfht(
        ht->bucket_at = mm->bucket_at;
        ht->min_nr_alloc_buckets = min_nr_alloc_buckets;
        ht->min_alloc_buckets_order =
-               get_count_order_ulong(min_nr_alloc_buckets);
+               cds_lfht_get_count_order_ulong(min_nr_alloc_buckets);
        ht->max_nr_buckets = max_nr_buckets;
 
        return ht;
This page took 0.02237 seconds and 4 git commands to generate.