6de79a4991
fast path here, for robust/PI/PP mutexes call __pthread_mutex_lock_full. Don't use switch, instead use a series of ifs according to their probability. (__pthread_mutex_lock_full): New function. * pthread_mutex_unlock.c: Include assert.h. (__pthread_mutex_unlock_usercnt): Handle only the fast path here, for robust/PI/PP mutexes call __pthread_mutex_unlock_full. Don't use switch, instead use a series of ifs according to their probability. (__pthread_mutex_unlock_full): New function. * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (__pthread_mutex_lock_full): Define.
15 lines
518 B
C
15 lines
518 B
C
#include <pthreadP.h>
|
|
|
|
#define LLL_MUTEX_LOCK(mutex) \
|
|
lll_cond_lock ((mutex)->__data.__lock, PTHREAD_MUTEX_PSHARED (mutex))
|
|
#define LLL_MUTEX_TRYLOCK(mutex) \
|
|
lll_cond_trylock ((mutex)->__data.__lock)
|
|
#define LLL_ROBUST_MUTEX_LOCK(mutex, id) \
|
|
lll_robust_cond_lock ((mutex)->__data.__lock, id, \
|
|
PTHREAD_ROBUST_MUTEX_PSHARED (mutex))
|
|
#define __pthread_mutex_lock __pthread_mutex_cond_lock
|
|
#define __pthread_mutex_lock_full __pthread_mutex_cond_lock_full
|
|
#define NO_INCR
|
|
|
|
#include <nptl/pthread_mutex_lock.c>
|