Fixes regressions in PPC.
@ -45,10 +45,12 @@ ck_barrier_centralized(struct ck_barrier_centralized *barrier,
value = ck_pr_faa_uint(&barrier->value, 1);
if (value == n_threads - 1) {
ck_pr_store_uint(&barrier->value, 0);
ck_pr_fence_store();
ck_pr_store_uint(&barrier->sense, sense);
return;
}
ck_pr_fence_memory();
while (sense != ck_pr_load_uint(&barrier->sense))
ck_pr_stall();
@ -182,8 +182,10 @@ ck_barrier_combining_aux(struct ck_barrier_combining *barrier,
* are at the barrier.
*/
ck_pr_store_uint(&tnode->count, 0);
ck_pr_store_uint(&tnode->sense, ~tnode->sense);
} else {
while (sense != ck_pr_load_uint(&tnode->sense))