projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Add failover for platforms without nproc
[userspace-rcu.git]
/
rculfhash-internal.h
diff --git
a/rculfhash-internal.h
b/rculfhash-internal.h
index a8a1ce42f1af1620f62aa7df9161ea68c5c05b14..d7cec95a10e286f4693c91925e61441146196ebe 100644
(file)
--- a/
rculfhash-internal.h
+++ b/
rculfhash-internal.h
@@
-25,11
+25,17
@@
*/
#include <urcu/rculfhash.h>
*/
#include <urcu/rculfhash.h>
+#include <stdio.h>
#ifdef DEBUG
#define dbg_printf(fmt, args...) printf("[debug rculfhash] " fmt, ## args)
#else
#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)
#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) \
#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 =
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;
ht->max_nr_buckets = max_nr_buckets;
return ht;
This page took
0.037165 seconds
and
4
git commands to generate.