mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:37:44 +00:00
Kernel: Clean up sys$futex and add support for cross-process futexes
This commit is contained in:
parent
55c7496200
commit
9db10887a1
9 changed files with 164 additions and 70 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue