diff options
author | Yabin Cui <yabinc@google.com> | 2015-03-17 18:40:38 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-03-17 18:40:39 +0000 |
commit | a75771e3ab429fae2f9af770416150733264a281 (patch) | |
tree | 916d3348f1b9ef4192f754f71ce422994370d44a | |
parent | 94babaee1b6598b15bd807461055d4dcaaa52f10 (diff) | |
parent | ecbfb25c504b7360d250c849ab47890ad54b6125 (diff) | |
download | android_bionic-a75771e3ab429fae2f9af770416150733264a281.tar.gz android_bionic-a75771e3ab429fae2f9af770416150733264a281.tar.bz2 android_bionic-a75771e3ab429fae2f9af770416150733264a281.zip |
Merge "Fix build: pthread_mutex/pthread_detach."
-rw-r--r-- | libc/bionic/pthread_detach.cpp | 4 | ||||
-rw-r--r-- | libc/bionic/pthread_mutex.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libc/bionic/pthread_detach.cpp b/libc/bionic/pthread_detach.cpp index 0712d0d67..7ae5eb4c6 100644 --- a/libc/bionic/pthread_detach.cpp +++ b/libc/bionic/pthread_detach.cpp @@ -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. } } diff --git a/libc/bionic/pthread_mutex.cpp b/libc/bionic/pthread_mutex.cpp index f1107823e..24066ae02 100644 --- a/libc/bionic/pthread_mutex.cpp +++ b/libc/bionic/pthread_mutex.cpp @@ -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; } |