diff options
author | Austin Foxley <austinf@cetoncorp.com> | 2009-09-23 09:55:03 -0700 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2009-09-23 09:56:04 -0700 |
commit | d74b8a68d450072ee3c6e6b586d32ff38e88f840 (patch) | |
tree | 02981405617f4cf3e9366a8e8e88aae452cab797 /libpthread/linuxthreads/manager.c | |
parent | 46348ce60a0005d8009349f09f80ca35669801b9 (diff) | |
download | uClibc-alpine-d74b8a68d450072ee3c6e6b586d32ff38e88f840.tar.bz2 uClibc-alpine-d74b8a68d450072ee3c6e6b586d32ff38e88f840.tar.xz |
tls: test for DTV vs TCB at TP correctly
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libpthread/linuxthreads/manager.c')
-rw-r--r-- | libpthread/linuxthreads/manager.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libpthread/linuxthreads/manager.c b/libpthread/linuxthreads/manager.c index b068d6c66..4293741ac 100644 --- a/libpthread/linuxthreads/manager.c +++ b/libpthread/linuxthreads/manager.c @@ -601,7 +601,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr, new_thread = _dl_allocate_tls (NULL); if (new_thread == NULL) return EAGAIN; -# if TLS_DTV_AT_TP +# if defined(TLS_DTV_AT_TP) /* pthread_descr is below TP. */ new_thread = (pthread_descr) ((char *) new_thread - TLS_PRE_TCB_SIZE); # endif @@ -622,7 +622,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr, if (sseg >= PTHREAD_THREADS_MAX) { #ifdef USE_TLS -# if TLS_DTV_AT_TP +# if defined(TLS_DTV_AT_TP) new_thread = (pthread_descr) ((char *) new_thread + TLS_PRE_TCB_SIZE); # endif _dl_deallocate_tls (new_thread, true); @@ -824,7 +824,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr, #endif } #ifdef USE_TLS -# if TLS_DTV_AT_TP +# if defined(TLS_DTV_AT_TP) new_thread = (pthread_descr) ((char *) new_thread + TLS_PRE_TCB_SIZE); # endif _dl_deallocate_tls (new_thread, true); @@ -917,7 +917,7 @@ static void pthread_free(pthread_descr th) } #ifdef USE_TLS -# if TLS_DTV_AT_TP +# if defined(TLS_DTV_AT_TP) th = (pthread_descr) ((char *) th + TLS_PRE_TCB_SIZE); # endif _dl_deallocate_tls (th, true); |