ht->keylen = keylen;
ht->hashseed = hashseed;
/* this mutex should not nest in read-side C.S. */
pthread_mutex_init(&ht->resize_mutex, NULL);
ht->keylen = keylen;
ht->hashseed = hashseed;
/* this mutex should not nest in read-side C.S. */
pthread_mutex_init(&ht->resize_mutex, NULL);
- hash = ht->hash_fct(key, ht->keylen, ht->hashseed) % ht->size;
+ hash = ht->hash_fct(key, ht->keylen, ht->hashseed)
+ % LOAD_SHARED(ht->size);
- hash = ht->hash_fct(key, ht->keylen, ht->hashseed) % ht->size;
+ hash = ht->hash_fct(key, ht->keylen, ht->hashseed)
+ % LOAD_SHARED(ht->size);
new_size = old_size << 1;
new_tbl = calloc(new_size, sizeof(struct rcu_ht_node *));
new_size = old_size << 1;
new_tbl = calloc(new_size, sizeof(struct rcu_ht_node *));
while (node) {
hash = ht->hash_fct(node->key, ht->keylen, ht->hashseed)
% new_size;
new_node = malloc(sizeof(struct rcu_ht_node));
new_node->key = node->key;
new_node->data = node->data;
while (node) {
hash = ht->hash_fct(node->key, ht->keylen, ht->hashseed)
% new_size;
new_node = malloc(sizeof(struct rcu_ht_node));
new_node->key = node->key;
new_node->data = node->data;