diff options
author | Austin Foxley <austinf@cetoncorp.com> | 2009-10-17 11:41:26 -0700 |
---|---|---|
committer | Austin Foxley <austinf@cetoncorp.com> | 2009-10-17 11:41:26 -0700 |
commit | 4596f460207d5c11a363c20745e5a7b56a0600c0 (patch) | |
tree | ad16180460e18c90f5524a16aa254bce3266c660 /libpthread/linuxthreads/pthread.c | |
parent | 9b69fa33f016d8fd3c658fdcab70fa0700521752 (diff) |
linuxthreads: check TLS_DTV_AT_TP define correctly
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libpthread/linuxthreads/pthread.c')
-rw-r--r-- | libpthread/linuxthreads/pthread.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libpthread/linuxthreads/pthread.c b/libpthread/linuxthreads/pthread.c index 4d1d9062a..6ae9a10d9 100644 --- a/libpthread/linuxthreads/pthread.c +++ b/libpthread/linuxthreads/pthread.c @@ -474,10 +474,10 @@ __libc_dl_error_tsd (void) static __inline__ void __attribute__((always_inline)) init_one_static_tls (pthread_descr descr, struct link_map *map) { -# if TLS_TCB_AT_TP +# if defined(TLS_TCB_AT_TP) dtv_t *dtv = GET_DTV (descr); void *dest = (char *) descr - map->l_tls_offset; -# elif TLS_DTV_AT_TP +# elif defined(TLS_DTV_AT_TP) dtv_t *dtv = GET_DTV ((pthread_descr) ((char *) descr + TLS_PRE_TCB_SIZE)); void *dest = (char *) descr + map->l_tls_offset + TLS_PRE_TCB_SIZE; # else @@ -669,9 +669,9 @@ int __pthread_initialize_manager(void) return -1; } -# if TLS_TCB_AT_TP +# if defined(TLS_TCB_AT_TP) mgr = (pthread_descr) tcbp; -# elif TLS_DTV_AT_TP +# elif defined(TLS_DTV_AT_TP) /* pthread_descr is located right below tcbhead_t which _dl_allocate_tls returns. */ mgr = (pthread_descr) ((char *) tcbp - TLS_PRE_TCB_SIZE); @@ -996,7 +996,7 @@ static void pthread_onexit_process(int retcode, void *arg) For mtrace, we'd like to print something though. */ /* #ifdef USE_TLS tcbhead_t *tcbp = (tcbhead_t *) manager_thread; - # if TLS_DTV_AT_TP + # if defined(TLS_DTV_AT_TP) tcbp = (tcbhead_t) ((char *) tcbp + TLS_PRE_TCB_SIZE); # endif _dl_deallocate_tls (tcbp, true); |