History log of /bionic/libc/bionic/pthread_internal.cpp
Revision Date Author Comments
4bc739a54c4ba9063e91bef06ff226dab118792d 05-Feb-2016 Dimitry Ivanov <dimitry@google.com> Add check for pthread_self() when looking up a thread

Check if thread_id is in fact pthread_self before
locking on g_thread_list_lock in __pthread_internal_find.

The main reason for doing this is not performance but to allow
the linker use raise() which was not working because pthread_kill()
couldn't find pthread_self() thread because the global thread
list is initialized in libc.so and the linker's version of this
list is empty.

Bug: http://b/25867917
Change-Id: I18fe620e8cd465b30f0e1ff45fff32958f3c5c00
220b99bdc1c5f51825ac2a87062bc05fe3e0d722 26-Mar-2015 Yabin Cui <yabinc@google.com> Revert "Cause Fatal error when invalid pthread_id is detected."

Some code like in https://buganizer.corp.google.com/u/0/issues/19942911 need to change first.

This reverts commit 03324780aae9ff28c8acf52debf0ea39120e5ab8.

Change-Id: I13ff1e5b3d0672bae9cde234ffba32fbbf33d338
03324780aae9ff28c8acf52debf0ea39120e5ab8 25-Mar-2015 Yabin Cui <yabinc@google.com> Cause Fatal error when invalid pthread_id is detected.

This is a patch testing whether we can use abort() instead of
returning ESRCH for invalid pthread ids. It is an intermediate
step to remove g_thread_list/g_thread_list_lock.

Bug: 19636317
Change-Id: Idd8e4a346c7ce91e1be0c2ebcb78ce51c0d0a31d
673b15e4ee2c6d99b150aedddc0f389e29f98e1b 19-Mar-2015 Yabin Cui <yabinc@google.com> Let g_thread_list_lock only protect g_thread_list.

As glibc/netbsd don't protect access to thread struct members by a global
lock, we don't want to do it either. This change reduces the
responsibility of g_thread_list_lock to only protect g_thread_list.

Bug: 19636317
Change-Id: I897890710653dac165d8fa4452c7ecf74abdbf2b