summaryrefslogtreecommitdiff
path: root/pthread/pt-internal.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-04-27 01:32:54 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-04-27 01:37:36 +0000
commit25260994c812050a5d7addf125cdc90c911ca5c1 (patch)
tree255b2ba5ba5b799b1a5f23aef17d75534103de0a /pthread/pt-internal.h
parente84c82a43e671c7506401936ac097b55d0fb47bf (diff)
Store self in __thread variable instead of threadvar
* sysdeps/mach/hurd/pt-sysdep.h (_HURD_THREADVAR_THREAD): Remove macro. (___pthread_self): Declare new __thread variable. (_pthread_self): Take self pointer from ___pthread_self instead of threadvar. * sysdeps/mach/hurd/pt-sysdep.c (___pthread_self): Define new __thread variable. (init_routine): Set ___pthread_self to initial thread structure. * pthread/pt-internal.h (__pthread_setup): Add `self' parameter to `entry_point' parameter. * pthread/pt-create.c (entry_point): Add `self' parameter. Store it in ___pthread_self. * sysdeps/l4/hurd/ia32/pt-setup.c (stack_setup): Add `self parameter to `entry_point' parameter. Pass it the `thread' parameter. (__pthread_setup): Likewise. * sysdeps/l4/hurd/powerpc/pt-setup.c (struct start_info): Add `self' field. (first_entry_1): Pass `self' parameter. (stack_setup): Add `self' parameter to `entry_point' parameter, pass it the `thread' parameter. (__pthread_setup): Likewise. * sysdeps/mach/hurd/ia32/pt-setup.c (stack_setup): Pass `thread' parameter to the start routine. (stack_setup): Add `self' parameter to `entry_point' paramter.
Diffstat (limited to 'pthread/pt-internal.h')
-rw-r--r--pthread/pt-internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/pthread/pt-internal.h b/pthread/pt-internal.h
index a1da377..f5766e9 100644
--- a/pthread/pt-internal.h
+++ b/pthread/pt-internal.h
@@ -217,7 +217,8 @@ extern void __pthread_stack_dealloc (void *stackaddr, size_t stacksize);
/* Setup thread THREAD's context. */
extern int __pthread_setup (struct __pthread *__restrict thread,
- void (*entry_point)(void *(*)(void *),
+ void (*entry_point)(struct __pthread *,
+ void *(*)(void *),
void *),
void *(*start_routine)(void *),
void *__restrict arg);