diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2007-06-13 00:00:00 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@schwinge.name> | 2011-10-20 16:51:57 +0200 |
commit | 577976c386d89696ec392fdfbb77ea153ddd6588 (patch) | |
tree | b386ad39ea74625e531e74340001782731e39364 /sysdeps/mach/hurd/pt-sysdep.h | |
parent | b46bf7d8865dc55842a68f30f64ac064daf87441 (diff) |
TLS support for libpthread, Mach/Hurd (x86).
* Makefile (CFLAGS): Define ENABLE_TLS.
* pthread/pt-create.c (__pthread_create_internal) [ENABLE_TLS]: Call
into glibc to allocate static TLS block.
* pthread/pt-exit.c (pthread_exit) [ENABLE_TLS]: Call into glibc to
deallocate static TLS block.
* pthread/pt-internal.h [ENABLE_TLS] (tcbhead_t): New structure; as in
glibc.
(__pthread) [ENABLE_TLS]: Add TCB member.
[ENABLE_TLS] (_dl_allocate_tls, _dl_deallocate_tls): Declare; from
glibc.
* sysdeps/mach/hurd/pt-sysdep.h (__thread_set_pcsp): Rename to
__thread_set_pcsptp. Add SET_TP and TP parameters. Change all
callers.
* sysdeps/mach/hurd/i386/pt-machdep.c (__thread_set_pcsptp): Imlement
TLS support.
* sysdeps/mach/hurd/i386/pt-setup.c (__pthread_setup): Likewise.
Diffstat (limited to 'sysdeps/mach/hurd/pt-sysdep.h')
-rw-r--r-- | sysdeps/mach/hurd/pt-sysdep.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sysdeps/mach/hurd/pt-sysdep.h b/sysdeps/mach/hurd/pt-sysdep.h index 83bad96..f652b68 100644 --- a/sysdeps/mach/hurd/pt-sysdep.h +++ b/sysdeps/mach/hurd/pt-sysdep.h @@ -1,5 +1,5 @@ /* Internal defenitions for pthreads library. - Copyright (C) 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2002, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -59,11 +59,13 @@ __pthread_stack_dealloc (void *stackaddr, size_t stacksize) __vm_deallocate (__mach_task_self (), (vm_offset_t) stackaddr, stacksize); } -/* Change thread THREAD's program counter to PC if SET_PC is true and - its stack pointer to SP if SET_IP is true. */ -extern int __thread_set_pcsp (thread_t thread, +/* Change thread THREAD's program counter to PC if SET_PC is true, + its stack pointer to SP if SET_IP is true, and its thread pointer + to TP if SET_TP is true. */ +extern int __thread_set_pcsptp (thread_t thread, int set_pc, void *pc, - int set_sp, void *sp); + int set_sp, void *sp, + int set_tp, void *tp); #endif /* pt-sysdep.h */ |