Use mmap to create the pthread_internal_t
Add name to mmaped regions.
Add pthread benchmark code.
Allocate pthread_internal_t on regular stack.
Bug: 16847284
Change-Id: Id60835163bb0d68092241f1a118015b5a8f85069
diff --git a/libc/bionic/pthread_detach.cpp b/libc/bionic/pthread_detach.cpp
index a8608e3..715acf1 100644
--- a/libc/bionic/pthread_detach.cpp
+++ b/libc/bionic/pthread_detach.cpp
@@ -46,7 +46,7 @@
if (thread->tid == 0) {
// Already exited; clean up.
- _pthread_internal_remove_locked(thread.get());
+ _pthread_internal_remove_locked(thread.get(), true);
return 0;
}