am 7d9f1cc5: am f0f8cd1f: Merge "Remove the global lock around thread stack creation."

* commit '7d9f1cc55c1f3641431e4ec8cf88d374025c5f39':
  Remove the global lock around thread stack creation.
This commit is contained in:
Elliott Hughes 2014-07-12 02:06:32 +00:00 committed by Android Git Automerger
commit a9e847fdea

View File

@ -47,8 +47,6 @@
extern "C" __LIBC_HIDDEN__ void __init_user_desc(struct user_desc*, int, void*); extern "C" __LIBC_HIDDEN__ void __init_user_desc(struct user_desc*, int, void*);
#endif #endif
static pthread_mutex_t g_pthread_stack_creation_lock = PTHREAD_MUTEX_INITIALIZER;
extern "C" int __isthreaded; extern "C" int __isthreaded;
// This code is used both by each new pthread and the code that initializes the main thread. // This code is used both by each new pthread and the code that initializes the main thread.
@ -104,8 +102,6 @@ int __init_thread(pthread_internal_t* thread, bool add_to_thread_list) {
} }
static void* __create_thread_stack(pthread_internal_t* thread) { static void* __create_thread_stack(pthread_internal_t* thread) {
ScopedPthreadMutexLocker lock(&g_pthread_stack_creation_lock);
// Create a new private anonymous map. // Create a new private anonymous map.
int prot = PROT_READ | PROT_WRITE; int prot = PROT_READ | PROT_WRITE;
int flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE; int flags = MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE;