diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2023-04-13 14:58:12 +0300 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-04-14 10:31:22 +0000 |
commit | ba00d787f3469b02032766b074d4df9071fa7e24 (patch) | |
tree | 2686e3886f3ade9e279c7e3cdc66192b79d4576e /hurd | |
parent | 05fe3ecffff485032e904f0a3ea709e24d9188eb (diff) | |
download | glibc-ba00d787f3469b02032766b074d4df9071fa7e24.tar glibc-ba00d787f3469b02032766b074d4df9071fa7e24.tar.gz glibc-ba00d787f3469b02032766b074d4df9071fa7e24.tar.bz2 glibc-ba00d787f3469b02032766b074d4df9071fa7e24.zip |
hurd: Remove __hurd_local_reply_port
Now that the signal code no longer accesses it, the only real user of it
was mig-reply.c, so move the logic for managing the port there.
If we're in SHARED and outside of rtld, we know that __LIBC_NO_TLS ()
always evaluates to 0, and a TLS reply port will always be used, not
__hurd_reply_port0. Still, the compiler does not see that
__hurd_reply_port0 is never used due to its address being taken. To deal
with this, explicitly compile out __hurd_reply_port0 when we know we
won't use it.
Also, instead of accessing the port via THREAD_SELF->reply_port, this
uses THREAD_GETMEM and THREAD_SETMEM directly, avoiding possible
miscompilations.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/hurd/threadvar.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/hurd/hurd/threadvar.h b/hurd/hurd/threadvar.h index f5c6a278a6..c476d98880 100644 --- a/hurd/hurd/threadvar.h +++ b/hurd/hurd/threadvar.h @@ -29,11 +29,4 @@ extern unsigned long int __hurd_sigthread_stack_base; extern unsigned long int __hurd_sigthread_stack_end; -/* Store the MiG reply port reply port until we enable TLS. */ -extern mach_port_t __hurd_reply_port0; - -/* This returns either the TLS reply port variable, or a single-thread variable - when TLS is not initialized yet. */ -#define __hurd_local_reply_port (*(__LIBC_NO_TLS () ? &__hurd_reply_port0 : &THREAD_SELF->reply_port)) - #endif /* hurd/threadvar.h */ |