summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/pthread_once.cpp
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-07-14 01:25:35 +0300
committerAndreas Kling <kling@serenityos.org>2022-07-21 16:39:22 +0200
commit9db10887a1499db41c1c549cf60a9c0ba27766c0 (patch)
treec042c39333ef100280a633e7dcb85fe4bd2a76cb /Userland/Libraries/LibC/pthread_once.cpp
parent55c7496200a321226b3599c24cfd40e899df73b0 (diff)
downloadserenity-9db10887a1499db41c1c549cf60a9c0ba27766c0.zip
Kernel: Clean up sys$futex and add support for cross-process futexes
Diffstat (limited to 'Userland/Libraries/LibC/pthread_once.cpp')
-rw-r--r--Userland/Libraries/LibC/pthread_once.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibC/pthread_once.cpp b/Userland/Libraries/LibC/pthread_once.cpp
index ab435d4639..f13f4eaa7a 100644
--- a/Userland/Libraries/LibC/pthread_once.cpp
+++ b/Userland/Libraries/LibC/pthread_once.cpp
@@ -46,7 +46,7 @@ int pthread_once(pthread_once_t* self, void (*callback)(void))
// anyone.
break;
case State::PERFORMING_WITH_WAITERS:
- futex_wake(self, INT_MAX);
+ futex_wake(self, INT_MAX, false);
break;
}
@@ -76,7 +76,7 @@ int pthread_once(pthread_once_t* self, void (*callback)(void))
[[fallthrough]];
case State::PERFORMING_WITH_WAITERS:
// Let's wait for it.
- futex_wait(self, state2, nullptr, 0);
+ futex_wait(self, state2, nullptr, 0, false);
// We have been woken up, but that might have been due to a signal
// or something, so we have to reevaluate. We need acquire ordering
// here for the same reason as above. Hopefully we'll just see