We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bbd476 commit 1e80063Copy full SHA for 1e80063
libc/src/__support/threads/linux/barrier.cpp
@@ -44,16 +44,14 @@ int Barrier::wait() {
44
m.lock();
45
46
// if the barrier is emptying out threads, wait until it finishes
47
- while (!blocking) {
+ while (!blocking)
48
entering.wait(&m);
49
- }
50
waiting++;
51
52
if (waiting < expected) {
53
// block threads until waiting = expected
54
- while (blocking) {
+ while (blocking)
55
exiting.wait(&m);
56
57
} else {
58
// this is the last thread to call wait(), so lets wake everyone up
59
blocking = false;
0 commit comments