X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=rculfhash-internal.h;h=d7cec95a10e286f4693c91925e61441146196ebe;hp=a8a1ce42f1af1620f62aa7df9161ea68c5c05b14;hb=b83b3590caf8ddd0fb1393b0d8378f916c8bf831;hpb=1228af1ceae83f0886de7fb593b8e57e1a74e1db diff --git a/rculfhash-internal.h b/rculfhash-internal.h index a8a1ce4..d7cec95 100644 --- a/rculfhash-internal.h +++ b/rculfhash-internal.h @@ -25,11 +25,17 @@ */ #include +#include #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;