ck_barrier: Use full barrier semantics for RMO.

ck_pring
Samy Al Bahra 10 years ago
parent 421d4d1901
commit 219e3a7dd8

@ -50,7 +50,7 @@ ck_barrier_centralized(struct ck_barrier_centralized *barrier,
return;
}
ck_pr_fence_load();
ck_pr_fence_atomic_load();
while (sense != ck_pr_load_uint(&barrier->sense))
ck_pr_stall();

@ -119,5 +119,6 @@ ck_barrier_dissemination(struct ck_barrier_dissemination *barrier,
state->sense = ~state->sense;
state->parity = 1 - state->parity;
ck_pr_fence_memory();
return;
}

@ -136,5 +136,6 @@ ck_barrier_mcs(struct ck_barrier_mcs *barrier,
ck_pr_store_uint(barrier[state->vpid].children[0], state->sense);
ck_pr_store_uint(barrier[state->vpid].children[1], state->sense);
state->sense = ~state->sense;
ck_pr_fence_memory();
return;
}

@ -178,6 +178,7 @@ wakeup:
}
leave:
ck_pr_fence_memory();
state->sense = ~state->sense;
return;
}

Loading…
Cancel
Save