summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibPthread/pthread_cond.cpp
AgeCommit message (Collapse)Author
2021-08-17Kernel+Userland: Remove global futexesAndreas Kling
We only ever use private futexes, so it doesn't make sense to carry around all the complexity required for global (cross-process) futexes.
2021-07-07LibC+LibPthread: Use FUTEX_PRIVATE_FLAG in more placesSergey Bugaev
Performance go brrrrr
2021-07-06LibPthread: Fix some assertionsSergey Bugaev
2021-07-06LibPthread: Fix orderingSergey Bugaev
It would be enough to use relaxed ordering here if it weren't for the mutex, which we also need to store and retrieve. To ensure the pthread_cond_broadcast() call sees the store, use release and acquire as appropriate. Thankfully, both of these are on the slow paths.
2021-07-05LibPthread: Reimplement condition variablesSergey Bugaev
This implementation features a fast path for pthread_cond_signal() and pthread_cond_broadcast() for the case there's no thread waiting, and does not exhibit the "thundering herd" issue in pthread_cond_broadcast(). Fixes https://github.com/SerenityOS/serenity/issues/8432