am 136e7f2b: am 611b903c: Merge "Properly detect timeout in pthread_mutex_lock_timeout_np_impl"

* commit '136e7f2b7909007d29e4cb917a85fc1d6ef0f6d5':
  Properly detect timeout in pthread_mutex_lock_timeout_np_impl
This commit is contained in:
Elliott Hughes 2013-12-18 18:07:23 +00:00 committed by Android Git Automerger
commit 03335d9124

View File

@ -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;