#endif
#define HASH_SIZE 32
-#define RAND_POOL 1000
+#define RAND_POOL 10000
/* Make this big enough to include the POWER5+ L3 cacheline size of 256B */
#define CACHE_LINE_SIZE 4096
rcu_read_lock();
ht_node_init(node,
(void *)(unsigned long)(rand_r(&rand_lookup) % RAND_POOL),
- sizeof(void *),
- (void *) 0x42);
- ht_add(test_ht, node);
+ sizeof(void *));
+ ret = ht_add_unique(test_ht, node);
rcu_read_unlock();
- nr_add++;
+ if (ret) {
+ free(node);
+ nr_addexist++;
+ } else
+ nr_add++;
} else {
/* May delete */
rcu_read_lock();