Lines Matching +full:sense +full:-
2 * Copyright 2011-2015 Samy Al Bahra.
41 bool p = nthr & (nthr - 1); in ck_barrier_dissemination_init()
43 barrier->nthr = nthr; in ck_barrier_dissemination_init()
44 barrier->size = size = ck_internal_log(ck_internal_power_2(nthr)); in ck_barrier_dissemination_init()
45 ck_pr_store_uint(&barrier->tid, 0); in ck_barrier_dissemination_init()
62 j = (i + offset) & (nthr - 1); in ck_barrier_dissemination_init()
83 state->parity = 0; in ck_barrier_dissemination_subscribe()
84 state->sense = ~0; in ck_barrier_dissemination_subscribe()
85 state->tid = ck_pr_faa_uint(&barrier->tid, 1); in ck_barrier_dissemination_subscribe()
101 unsigned int size = barrier->size; in ck_barrier_dissemination()
106 pflag = barrier[state->tid].flags[state->parity][i].pflag; in ck_barrier_dissemination()
107 tflag = &barrier[state->tid].flags[state->parity][i].tflag; in ck_barrier_dissemination()
110 ck_pr_store_uint(pflag, state->sense); in ck_barrier_dissemination()
113 while (ck_pr_load_uint(tflag) != state->sense) in ck_barrier_dissemination()
120 * be used for the next barrier. They also use a sense reversal technique in ck_barrier_dissemination()
121 * to avoid re-initialization of the flags for every two calls to the barrier. in ck_barrier_dissemination()
123 if (state->parity == 1) in ck_barrier_dissemination()
124 state->sense = ~state->sense; in ck_barrier_dissemination()
126 state->parity = 1 - state->parity; in ck_barrier_dissemination()