Skip to content

Commit b1be086

Browse files
committed
[Threading][Pthreads] Fix pthread_cond_wait() call.
For some reason the second argument went missing. Fix by adding it back.
1 parent da71729 commit b1be086

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Threading/Pthreads.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void swift::threading_impl::once_slow(once_t &predicate, void (*fn)(void *),
7171

7272
pthread_mutex_lock(&onceMutex);
7373
while (predicate.load(std::memory_order_acquire) >= (std::int64_t)0) {
74-
pthread_cond_wait(&onceCond);
74+
pthread_cond_wait(&onceCond, &onceMutex);
7575
}
7676
pthread_mutex_unlock(&onceMutex);
7777
}

0 commit comments

Comments
 (0)