|
|
@ -121,14 +121,14 @@ stack_pop_mpmc(ck_hp_record_t *record, struct stack *target)
|
|
|
|
if (entry == NULL)
|
|
|
|
if (entry == NULL)
|
|
|
|
return (NULL);
|
|
|
|
return (NULL);
|
|
|
|
|
|
|
|
|
|
|
|
ck_hp_set(record, 0, entry);
|
|
|
|
ck_hp_set_fence(record, 0, entry);
|
|
|
|
} while (entry != ck_pr_load_ptr(&target->head));
|
|
|
|
} while (entry != ck_pr_load_ptr(&target->head));
|
|
|
|
|
|
|
|
|
|
|
|
while (ck_pr_cas_ptr_value(&target->head, entry, entry->next, &entry) == false) {
|
|
|
|
while (ck_pr_cas_ptr_value(&target->head, entry, entry->next, &entry) == false) {
|
|
|
|
if (ck_pr_load_ptr(&entry) == NULL)
|
|
|
|
if (ck_pr_load_ptr(&entry) == NULL)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
ck_hp_set(record, 0, entry);
|
|
|
|
ck_hp_set_fence(record, 0, entry);
|
|
|
|
if (entry != ck_pr_load_ptr(&target->head))
|
|
|
|
if (entry != ck_pr_load_ptr(&target->head))
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
|
|
|
|