diff options
author | Sergey Bugaev <bugaevc@serenityos.org> | 2021-07-05 14:55:57 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-05 20:26:01 +0200 |
commit | 5536f3c27768111cb3d31adc17ed6320178b36b4 (patch) | |
tree | 737380cb044fd1150327735eb9919fd59119f989 /Userland/Libraries/LibC/bits | |
parent | 19bef909233c3a64905d63db86f07b5fba4d3440 (diff) | |
download | serenity-5536f3c27768111cb3d31adc17ed6320178b36b4.zip |
LibC: Add __pthread_mutex_lock_pessimistic_np()
This is a private function that locks the lock much like the regular
pthread_mutex_lock(), but causes the corresponding unlock operation to
always assume there may be other waiters. This is useful in case some
waiters are made to wait on the mutex's futex directly, without going
through pthread_mutex_lock(). This is going to be used by the condition
variable implementation in the next commit.
Diffstat (limited to 'Userland/Libraries/LibC/bits')
-rw-r--r-- | Userland/Libraries/LibC/bits/pthread_integration.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/bits/pthread_integration.h b/Userland/Libraries/LibC/bits/pthread_integration.h index b74462afd2..1d37ee2d44 100644 --- a/Userland/Libraries/LibC/bits/pthread_integration.h +++ b/Userland/Libraries/LibC/bits/pthread_integration.h @@ -21,6 +21,7 @@ void __pthread_fork_atfork_register_child(void (*)(void)); int __pthread_mutex_init(pthread_mutex_t*, const pthread_mutexattr_t*); int __pthread_mutex_lock(pthread_mutex_t*); int __pthread_mutex_trylock(pthread_mutex_t*); +int __pthread_mutex_lock_pessimistic_np(pthread_mutex_t*); int __pthread_mutex_unlock(pthread_mutex_t*); typedef void (*KeyDestructor)(void*); |