// Update the count if we were the one that completed the copy.
if (old_ht2_ent_val == DOES_NOT_EXIST) {
TRACE("h0", "hti_copy_entry: key %p value %p copied to new entry", key, ht1_ent_val);
- SYNC_ADD(&ht1->count, -1);
- SYNC_ADD(&ht2->count, 1);
+ (void)SYNC_ADD(&ht1->count, -1);
+ (void)SYNC_ADD(&ht2->count, 1);
return TRUE;
}
if (ent_val != COPIED_VALUE && ent_val != TAG_VALUE(TOMBSTONE, TAG1)) {
int did_copy = hti_copy_entry(hti, ent, key_hash, ((volatile hti_t *)hti)->next);
if (did_copy) {
- SYNC_ADD(&hti->num_entries_copied, 1);
+ (void)SYNC_ADD(&hti->num_entries_copied, 1);
}
TRACE("h0", "hti_cas: value in the middle of a copy, copy completed by %s",
(did_copy ? "self" : "other"), 0);
// The set succeeded. Adjust the value count.
if (old_existed && new == DOES_NOT_EXIST) {
- SYNC_ADD(&hti->count, -1);
+ (void)SYNC_ADD(&hti->count, -1);
} else if (!old_existed && new != DOES_NOT_EXIST) {
- SYNC_ADD(&hti->count, 1);
+ (void)SYNC_ADD(&hti->count, 1);
}
// Return the previous value.
if (EXPECT_FALSE(ent_val != COPIED_VALUE && ent_val != TAG_VALUE(TOMBSTONE, TAG1))) {
int did_copy = hti_copy_entry(hti, ent, key_hash, ((volatile hti_t *)hti)->next);
if (did_copy) {
- SYNC_ADD(&hti->num_entries_copied, 1);
+ (void)SYNC_ADD(&hti->num_entries_copied, 1);
}
}
return hti_get(((volatile hti_t *)hti)->next, key, key_hash); // tail-call