diff options
author | Yabin Cui <yabinc@google.com> | 2015-10-22 20:07:56 -0700 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-10-22 20:14:33 -0700 |
commit | d26e780df66b9add4cf7e7ebb2f6c6749d1c5050 (patch) | |
tree | 117eec6a39195e7edd7ead370513436698734abc /libc/bionic/pthread_internal.h | |
parent | 5edf077c5b92f0db212e45ed5402339a6e4c7334 (diff) | |
download | bionic-d26e780df66b9add4cf7e7ebb2f6c6749d1c5050.tar.gz |
Use bionic lock in pthread_internal_t.
It removes calling to pthread_mutex_lock() at the beginning of new
thread, which helps to support thread sanitizer.
Change-Id: Ia3601c476de7976a9177b792bd74bb200cee0e13
Diffstat (limited to 'libc/bionic/pthread_internal.h')
-rw-r--r-- | libc/bionic/pthread_internal.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/bionic/pthread_internal.h b/libc/bionic/pthread_internal.h index 6a39a214a..d5d62a787 100644 --- a/libc/bionic/pthread_internal.h +++ b/libc/bionic/pthread_internal.h @@ -31,6 +31,7 @@ #include <pthread.h> #include <stdatomic.h> +#include "private/bionic_lock.h" #include "private/bionic_tls.h" /* Has the thread been detached by a pthread_join or pthread_detach call? */ @@ -89,7 +90,7 @@ struct pthread_internal_t { void* alternate_signal_stack; - pthread_mutex_t startup_handshake_mutex; + Lock startup_handshake_lock; size_t mmap_size; |