am 611b903c: Merge "Properly detect timeout in pthread_mutex_lock_timeout_np_impl"
* commit '611b903ca7ba9d604a9e2ebc1efa5a66f7ccc049': Properly detect timeout in pthread_mutex_lock_timeout_np_impl
This commit is contained in:
commit
136e7f2b79
@ -783,7 +783,7 @@ int pthread_mutex_lock_timeout_np_impl(pthread_mutex_t *mutex, unsigned msecs)
|
|||||||
* thread.
|
* thread.
|
||||||
*/
|
*/
|
||||||
if (MUTEX_STATE_BITS_IS_LOCKED_CONTENDED(mvalue)) {
|
if (MUTEX_STATE_BITS_IS_LOCKED_CONTENDED(mvalue)) {
|
||||||
if (__futex_wait_ex(&mutex->value, shared, mvalue, &ts) == ETIMEDOUT) {
|
if (__futex_wait_ex(&mutex->value, shared, mvalue, &ts) == (-ETIMEDOUT)) {
|
||||||
return EBUSY;
|
return EBUSY;
|
||||||
}
|
}
|
||||||
mvalue = mutex->value;
|
mvalue = mutex->value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user