diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-03-03 18:30:44 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-03-03 18:30:44 -0500 |
commit | b480808a6a511c9350a6559b63938ac261c83a76 (patch) | |
tree | e5479cfec9500cc5cd2db4466d7bab2847d64735 /src/thread/pthread_getspecific.c | |
parent | a53d2f3425aa32b5770b03acbab12d1df3af7226 (diff) | |
download | musl-b480808a6a511c9350a6559b63938ac261c83a76.tar.gz musl-b480808a6a511c9350a6559b63938ac261c83a76.tar.xz musl-b480808a6a511c9350a6559b63938ac261c83a76.zip |
optimize POSIX TSD for fast pthread_getspecific
Diffstat (limited to 'src/thread/pthread_getspecific.c')
-rw-r--r-- | src/thread/pthread_getspecific.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/thread/pthread_getspecific.c b/src/thread/pthread_getspecific.c index a6ca27d0..b2a282c6 100644 --- a/src/thread/pthread_getspecific.c +++ b/src/thread/pthread_getspecific.c @@ -2,7 +2,6 @@ void *pthread_getspecific(pthread_key_t k) { - struct pthread *self = pthread_self(); - if (!self->tsd) return 0; + struct pthread *self = __pthread_self(); return self->tsd[k]; } |