CHashPtrMark(next)))
{
/* Deletion is done; attempt to remove node from list. */
+ Assert(!CHashPtrIsMarked(scan.target));
if (__sync_bool_compare_and_swap(scan.pointer_to_target,
scan.target,
- next))
+ CHashPtrUnmark(next)))
CHashAddToGarbage(table, bucket, scan.target);
else
cleanup_scan = true;
if (CHashPtrIsMarked(next))
{
zap:
- if (__sync_bool_compare_and_swap(pointer_to_target, target, next))
+ if (__sync_bool_compare_and_swap(pointer_to_target,
+ target,
+ CHashPtrUnmark(next)))
{
/*
* No one else can possibly have modified target_node->next,
/* If element is delete-marked, try to remove it. */
if (CHashPtrIsMarked(next))
{
- if (__sync_bool_compare_and_swap(pointer_to_target, target, next))
+ if (__sync_bool_compare_and_swap(pointer_to_target,
+ target,
+ CHashPtrUnmark(next)))
{
/* We removed the item. */
CHashAddToGarbage(table, hashcode & table->bucket_mask,