- int did_copy = hti_copy_entry(hti, e, key_hash, ((volatile hash_table_i_t *)hti)->next);
- if (did_copy) {
- SYNC_ADD(&hti->num_entries_copied, 1);
+ if (e_value != COPIED_VALUE) {
+ int did_copy = hti_copy_entry(hti, e, key_hash, ((volatile hash_table_i_t *)hti)->next);
+ if (did_copy) {
+ SYNC_ADD(&hti->num_entries_copied, 1);
+ }
+ TRACE("h0", "hti_compare_and_set: value in the middle of a copy, copy completed by %s",
+ (did_copy ? "self" : "other"), 0);