ck_hp_fifo: Finer-grained mapping to ck_pr_fence_X_Y.

Specifically, atomic-RMW fences were previously generalized
as store operations.
ck_pring
Samy Al Bahra 12 years ago
parent 58af5c3072
commit 0d827b4c81

@ -76,7 +76,7 @@ ck_hp_fifo_enqueue_mpmc(ck_hp_record_t *record,
entry->value = value;
entry->next = NULL;
ck_pr_fence_store();
ck_pr_fence_store_atomic();
for (;;) {
tail = ck_pr_load_ptr(&fifo->tail);
@ -93,7 +93,7 @@ ck_hp_fifo_enqueue_mpmc(ck_hp_record_t *record,
break;
}
ck_pr_fence_store();
ck_pr_fence_atomic();
ck_pr_cas_ptr(&fifo->tail, tail, entry);
return;
}
@ -108,7 +108,7 @@ ck_hp_fifo_tryenqueue_mpmc(ck_hp_record_t *record,
entry->value = value;
entry->next = NULL;
ck_pr_fence_store();
ck_pr_fence_store_atomic();
tail = ck_pr_load_ptr(&fifo->tail);
ck_hp_set(record, 0, tail);
@ -123,7 +123,7 @@ ck_hp_fifo_tryenqueue_mpmc(ck_hp_record_t *record,
} else if (ck_pr_cas_ptr(&fifo->tail->next, next, entry) == false)
return false;
ck_pr_fence_store();
ck_pr_fence_atomic();
ck_pr_cas_ptr(&fifo->tail, tail, entry);
return true;
}

Loading…
Cancel
Save