summaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-03-10 18:31:37 -0500
committerRich Felker <dalias@aerifal.cx>2011-03-10 18:31:37 -0500
commit5fcebcde6aeba6ae4a339790beba5331fbcd3b6e (patch)
tree8ed33494f1f8ac060f756027847b73d897274d7a /src/internal
parentdc54a7cbb9f0aad6f614131ecc683fbb0b717115 (diff)
downloadmusl-5fcebcde6aeba6ae4a339790beba5331fbcd3b6e.tar.gz
musl-5fcebcde6aeba6ae4a339790beba5331fbcd3b6e.tar.bz2
musl-5fcebcde6aeba6ae4a339790beba5331fbcd3b6e.tar.xz
musl-5fcebcde6aeba6ae4a339790beba5331fbcd3b6e.zip
optimize pthread termination in the non-detached case
we can avoid blocking signals by simply using a flag to mark that the thread has exited and prevent it from getting counted in the rsyscall signal-pingpong. this restores the original pthread create/join throughput from before the sigprocmask call was added.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/pthread_impl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h
index adb80f2f..c1740111 100644
--- a/src/internal/pthread_impl.h
+++ b/src/internal/pthread_impl.h
@@ -36,6 +36,7 @@ struct pthread {
struct __ptcb *cancelbuf;
void **tsd;
pthread_attr_t attr;
+ volatile int dead;
};
#define __SU (sizeof(size_t)/sizeof(int))