You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one removes any of the pthread_barrier_wait calls, all successors to pthread_barrier_wait would be dead.
To this end, one would track locally: In each thread a must $$\underline M$$ and a may set $$\overline M$$ of x for which pthread_barrier_wait(x) has been called.
Globally, one would track at a global unknown [x]:
The capacity passed to pthread_barrier_init
A set of unique thread ids that call pthread_barrier_wait at most once. (If any of these is non-unique or one thread calls wait several times, we go to top)
Then:
If the number of threads that may call pthread_barrier_wait is below the capacity (and all call it at most once and are unique), all successors of pthread_barrier_wait are dead.
If at an access pthread_barrier_wait(x) is known to have returned $$x \in \underline M$$, the above condition is known to hold and the other access is by a thread that has to call pthread_barrier_wait(x) for it to return, but $$x$$ is not in $$\overline M$$ there, these two accesses cannot race.
It should be possible to cast this into a may-race-predicate enhanced digest Julian and I have discussed a little 😉
The text was updated successfully, but these errors were encountered:
One of the features we could additionally have for checking for data races could be a support for
pthread_barrier
.If one removes any of the
pthread_barrier_wait
calls, all successors topthread_barrier_wait
would be dead.To this end, one would track locally: In each thread a must$$\underline M$$ and a may set $$\overline M$$ of x for which
pthread_barrier_wait(x)
has been called.Globally, one would track at a global unknown [x]:
pthread_barrier_init
pthread_barrier_wait
at most once. (If any of these is non-unique or one thread calls wait several times, we go to top)Then:
pthread_barrier_wait
is below the capacity (and all call it at most once and are unique), all successors ofpthread_barrier_wait
are dead.pthread_barrier_wait(x)
is known to have returnedpthread_barrier_wait(x)
for it to return, butIt should be possible to cast this into a may-race-predicate enhanced digest Julian and I have discussed a little 😉
The text was updated successfully, but these errors were encountered: