am 46f9b3e7: am a75771e3: Merge "Fix build: pthread_mutex/pthread_detach."

* commit '46f9b3e7662d946d775d30dbe91828e4cb935af5':
  Fix build: pthread_mutex/pthread_detach.
This commit is contained in:
Yabin Cui 2015-03-17 19:07:03 +00:00 committed by Android Git Automerger
commit a10afcc9cc
2 changed files with 3 additions and 3 deletions

View File

@ -44,9 +44,9 @@ int pthread_detach(pthread_t t) {
}
switch (old_state) {
case THREAD_NOT_JOINED: return 0;
case THREAD_JOINED: return 0; // Already being joined; silently do nothing, like glibc.
case THREAD_JOINED: return 0; // Already being joined; silently do nothing, like glibc.
case THREAD_DETACHED: return THREAD_DETACHED;
case THREAD_EXITED_NOT_JOINED: // Call pthread_join out of scope of pthread_accessor.
case THREAD_EXITED_NOT_JOINED: break; // Call pthread_join out of scope of pthread_accessor.
}
}

View File

@ -305,7 +305,7 @@ static inline int __pthread_normal_mutex_trylock(atomic_int* mutex_value_ptr, in
*/
static inline int __pthread_normal_mutex_lock(atomic_int* mutex_value_ptr, int shared,
const timespec* abs_timeout_or_null, clockid_t clock) {
if (__predict_true(__normal_mutex_trylock(mutex_value_ptr, shared) == 0)) {
if (__predict_true(__pthread_normal_mutex_trylock(mutex_value_ptr, shared) == 0)) {
return 0;
}