mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Don't do lock elision on an error checking mutex (bug 17514)
Error checking mutexes are not supposed to be subject to lock elision. That would defeat the error checking nature of the mutex because lock elision doesn't record ownership.
This commit is contained in:
@ -89,7 +89,8 @@ pthread_mutex_timedlock (pthread_mutex_t *mutex,
|
||||
if (__glibc_unlikely (mutex->__data.__owner == id))
|
||||
return EDEADLK;
|
||||
|
||||
/* FALLTHROUGH */
|
||||
/* Don't do lock elision on an error checking mutex. */
|
||||
goto simple;
|
||||
|
||||
case PTHREAD_MUTEX_TIMED_NP:
|
||||
FORCE_ELISION (mutex, goto elision);
|
||||
|
Reference in New Issue
Block a user