*/
#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)
*/
};
-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) \
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;