From b480808a6a511c9350a6559b63938ac261c83a76 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 3 Mar 2011 18:30:44 -0500 Subject: optimize POSIX TSD for fast pthread_getspecific --- src/thread/pthread_getspecific.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/thread/pthread_getspecific.c') 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]; } -- cgit v1.2.1