Lines Matching +full:sense +full:-
2 * Copyright 2011-2015 Samy Al Bahra.
36 unsigned int sense, value; in ck_barrier_centralized() local
39 * Every execution context has a sense associated with it. in ck_barrier_centralized()
40 * This sense is reversed when the barrier is entered. Every in ck_barrier_centralized()
41 * thread will spin on the global sense until the last thread in ck_barrier_centralized()
44 sense = state->sense = ~state->sense; in ck_barrier_centralized()
45 value = ck_pr_faa_uint(&barrier->value, 1); in ck_barrier_centralized()
46 if (value == n_threads - 1) { in ck_barrier_centralized()
47 ck_pr_store_uint(&barrier->value, 0); in ck_barrier_centralized()
49 ck_pr_store_uint(&barrier->sense, sense); in ck_barrier_centralized()
54 while (sense != ck_pr_load_uint(&barrier->sense)) in ck_barrier_centralized()