bug discription
in nk_barrier_wait(barrier) implementation, after every threads gets out, barrier->notify is not set back to zero;
On every reuse of this barrier, it has no effect;
I found this bug when I test on pthread library tests.
Changes Made to Nautilus (please include):
in src/nautilus/barrier.c function nk_barrier_wait
if (atomic_inc_val(barrier->remaining) == init_count) {
bspin_unlock(&barrier->lock);
}
to
if (atomic_inc_val(barrier->remaining) == init_count) {
atomic_cmpswap(barrier->notify, 1, 0);
bspin_unlock(&barrier->lock);
}
Additional context
Add any other context about the problem here.
bug discription in
nk_barrier_wait(barrier)
implementation, after every threads gets out,barrier->notify
is not set back to zero; On every reuse of this barrier, it has no effect; I found this bug when I test on pthread library tests.Changes Made to Nautilus (please include): in
src/nautilus/barrier.c
functionnk_barrier_wait
to
Additional context Add any other context about the problem here.