]> git.ipfire.org Git - thirdparty/glibc.git/blame - nptl/pthread_mutex_cond_lock.c
Consolidate non cancellable nanosleep call
[thirdparty/glibc.git] / nptl / pthread_mutex_cond_lock.c
CommitLineData
69431c9a
UD
1#include <pthreadP.h>
2
5bd8a249
UD
3#define LLL_MUTEX_LOCK(mutex) \
4 lll_cond_lock ((mutex)->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex))
e8c659d7
AK
5
6/* Not actually elided so far. Needed? */
7#define LLL_MUTEX_LOCK_ELISION(mutex) \
8 ({ lll_cond_lock ((mutex)->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex)); 0; })
9
5bd8a249
UD
10#define LLL_MUTEX_TRYLOCK(mutex) \
11 lll_cond_trylock ((mutex)->__data.__lock)
e8c659d7
AK
12#define LLL_MUTEX_TRYLOCK_ELISION(mutex) LLL_MUTEX_TRYLOCK(mutex)
13
65810f0e
TR
14/* We need to assume that there are other threads blocked on the futex.
15 See __pthread_mutex_lock_full for further details. */
16#define LLL_ROBUST_MUTEX_LOCK_MODIFIER FUTEX_WAITERS
9dd346ff 17#define __pthread_mutex_lock internal_function __pthread_mutex_cond_lock
6de79a49 18#define __pthread_mutex_lock_full __pthread_mutex_cond_lock_full
61623643 19#define NO_INCR
69431c9a
UD
20
21#include <nptl/pthread_mutex_lock.c>