1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

hurd: Fix exec usage of mach_setup_thread

Exec needs that mach_setup_thread does *not* set up TLS since it works on
another task, so we have to split this into mach_setup_tls.

	* mach/mach.h (__mach_setup_tls, mach_setup_tls): Add prototypes.
	* mach/setup-thread.c (__mach_setup_thread): Move TLS setup to...
	(__mach_setup_tls): ... new function.
	(mach_setup_tls): New alias.
	* hurd/hurdsig.c (_hurdsig_init): Call __mach_setup_tls after
	__mach_setup_thread.
	* sysdeps/mach/hurd/profil.c (update_waiter): Likewise.
	* sysdeps/mach/hurd/setitimer.c (setitimer_locked): Likewise.
	* mach/Versions [libc] (mach_setup_tls): Add symbol.
	* sysdeps/mach/hurd/i386/libc.abilist (mach_setup_tls): Likewise.
This commit is contained in:
Samuel Thibault
2018-08-01 00:10:03 +02:00
parent d4b54bdff0
commit 42fc12ef73
8 changed files with 41 additions and 11 deletions

View File

@ -96,5 +96,8 @@ kern_return_t mach_setup_thread (task_t task, thread_t thread, void *pc,
vm_address_t *stack_base,
vm_size_t *stack_size);
/* Give THREAD a TLS area. */
kern_return_t __mach_setup_tls (thread_t thread);
kern_return_t mach_setup_tls (thread_t thread);
#endif /* mach.h */