X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=rculfhash.c;h=824a940391461a1a3b7f1db0a847be38e84dd741;hb=17f31d1b07ffb59db8bad3ce2ae8f824ed820de0;hp=197a00f14984d09d8d3e08068a8f7bc89318b636;hpb=bb7b2f262ba9a888271c31f48d8c4331d33f2376;p=urcu.git diff --git a/rculfhash.c b/rculfhash.c index 197a00f..824a940 100644 --- a/rculfhash.c +++ b/rculfhash.c @@ -169,7 +169,8 @@ /* * Define the minimum table size. */ -#define MIN_TABLE_SIZE 128 +//#define MIN_TABLE_SIZE 128 +#define MIN_TABLE_SIZE 1 #if (CAA_BITS_PER_LONG == 32) #define MAX_TABLE_ORDER 32 @@ -1272,7 +1273,7 @@ struct cds_lfht_node *cds_lfht_add_unique(struct cds_lfht *ht, size = rcu_dereference(ht->t.size); ret = _cds_lfht_add(ht, size, node, 1, 0); - if (ret != node) + if (ret == node) ht_count_add(ht, size); return ret; }