interbench
interbench copied to clipboard
Race condition
https://github.com/ckolivas/interbench/blob/e612a65ce941028ddea804e6b45ccde2750720d2/interbench.c#L733-L738
A race condition is possible for ring load. Suppose that there are two ring threads '0' and '1'. Consider the following case:
- '0' thread has executed the final
post_sem(&ringthreads[post_to].sem.start);and finished. - '1' thread has received the final
start, but it hasn't receivedstopyet, and '0' thread has already finished, so '1' thread hangs inwait_sem(&s->start);forever.