diff options
author | Yabin Cui <yabinc@google.com> | 2015-03-26 18:14:22 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-03-26 18:14:23 +0000 |
commit | 8f3eb5a4e5dbbac1fb431e40e25eec07ecc24ee8 (patch) | |
tree | 6eaa84d2960c9e3788093101dd9ae2c9d9426ad7 /libc/bionic/pthread_internal.cpp | |
parent | 7c01e3a9ba80c85c7e7998d2347885e9a6e3bbf2 (diff) | |
parent | 220b99bdc1c5f51825ac2a87062bc05fe3e0d722 (diff) | |
download | android_bionic-8f3eb5a4e5dbbac1fb431e40e25eec07ecc24ee8.tar.gz android_bionic-8f3eb5a4e5dbbac1fb431e40e25eec07ecc24ee8.tar.bz2 android_bionic-8f3eb5a4e5dbbac1fb431e40e25eec07ecc24ee8.zip |
Merge "Revert "Cause Fatal error when invalid pthread_id is detected.""
Diffstat (limited to 'libc/bionic/pthread_internal.cpp')
-rw-r--r-- | libc/bionic/pthread_internal.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libc/bionic/pthread_internal.cpp b/libc/bionic/pthread_internal.cpp index afafad84c..1967ccf8c 100644 --- a/libc/bionic/pthread_internal.cpp +++ b/libc/bionic/pthread_internal.cpp @@ -81,16 +81,12 @@ void __pthread_internal_remove_and_free(pthread_internal_t* thread) { pthread_internal_t* __pthread_internal_find(pthread_t thread_id) { pthread_internal_t* thread = reinterpret_cast<pthread_internal_t*>(thread_id); - { - ScopedPthreadMutexLocker locker(&g_thread_list_lock); + ScopedPthreadMutexLocker locker(&g_thread_list_lock); - for (pthread_internal_t* t = g_thread_list; t != NULL; t = t->next) { - if (t == thread) { - return thread; - } + for (pthread_internal_t* t = g_thread_list; t != NULL; t = t->next) { + if (t == thread) { + return thread; } } - // TODO: Remove g_thread_list/g_thread_list_lock when the fatal error below doesn't happen. - __libc_fatal("No such thread: %p", thread); return NULL; } |