Lines Matching +full:sense +full:-
2 * Copyright 2011-2015 Samy Al Bahra.
54 state->sense = ~0; in ck_barrier_tournament_subscribe()
55 state->vpid = ck_pr_faa_uint(&barrier->tid, 1); in ck_barrier_tournament_subscribe()
66 ck_pr_store_uint(&barrier->tid, 0); in ck_barrier_tournament_init()
67 barrier->size = size = ck_barrier_tournament_size(nthr); in ck_barrier_tournament_init()
76 imod2k = i & (twok - 1); in ck_barrier_tournament_init()
90 rounds[i][k].opponent = &rounds[i - twokm1][k].flag; in ck_barrier_tournament_init()
97 ck_pr_store_ptr(&barrier->rounds, rounds); in ck_barrier_tournament_init()
112 struct ck_barrier_tournament_round **rounds = ck_pr_load_ptr(&barrier->rounds); in ck_barrier_tournament()
115 if (barrier->size == 1) in ck_barrier_tournament()
119 switch (rounds[state->vpid][round].role) { in ck_barrier_tournament()
127 while (ck_pr_load_uint(&rounds[state->vpid][round].flag) != state->sense) in ck_barrier_tournament()
130 ck_pr_store_uint(rounds[state->vpid][round].opponent, state->sense); in ck_barrier_tournament()
140 ck_pr_store_uint(rounds[state->vpid][round].opponent, state->sense); in ck_barrier_tournament()
141 while (ck_pr_load_uint(&rounds[state->vpid][round].flag) != state->sense) in ck_barrier_tournament()
150 while (ck_pr_load_uint(&rounds[state->vpid][round].flag) != state->sense) in ck_barrier_tournament()
157 for (round -= 1 ;; --round) { in ck_barrier_tournament()
158 switch (rounds[state->vpid][round].role) { in ck_barrier_tournament()
175 ck_pr_store_uint(rounds[state->vpid][round].opponent, state->sense); in ck_barrier_tournament()
182 state->sense = ~state->sense; in ck_barrier_tournament()