mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:07:45 +00:00
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.
This commit is contained in:
parent
19bef90923
commit
5536f3c277
2 changed files with 17 additions and 0 deletions
|
@ -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*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue