int x = hti->copy_scan;
TRACE("h1", "ht_cas: help copy. scan is %llu, size is %llu", x, 1<<hti->scale);
int x = hti->copy_scan;
TRACE("h1", "ht_cas: help copy. scan is %llu, size is %llu", x, 1<<hti->scale);
// Panic if we've been around the array twice and still haven't finished the copy.
int panic = (x >= (1 << (hti->scale + 1)));
if (!panic) {
// Panic if we've been around the array twice and still haven't finished the copy.
int panic = (x >= (1 << (hti->scale + 1)));
if (!panic) {
} else {
TRACE("h1", "ht_cas: help copy panic", 0, 0);
// scan the whole table
} else {
TRACE("h1", "ht_cas: help copy panic", 0, 0);
// scan the whole table
if (val == COPIED_VALUE) {
uint32_t hash = (iter->hti->ht->key_type == NULL)
? murmur32_8b(key)
: iter->hti->ht->key_type->hash((void *)key);
if (val == COPIED_VALUE) {
uint32_t hash = (iter->hti->ht->key_type == NULL)
? murmur32_8b(key)
: iter->hti->ht->key_type->hash((void *)key);
}
void ht_iter_free (ht_iter_t *iter) {
SYNC_ADD(&iter->hti->references, -1);
}
void ht_iter_free (ht_iter_t *iter) {
SYNC_ADD(&iter->hti->references, -1);