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 /sysdeps/mach/sysdep.h | |
parent | 05fe3ecffff485032e904f0a3ea709e24d9188eb (diff) | |
download | glibc-ba00d787f3469b02032766b074d4df9071fa7e24.tar.gz glibc-ba00d787f3469b02032766b074d4df9071fa7e24.tar.xz 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 'sysdeps/mach/sysdep.h')
-rw-r--r-- | sysdeps/mach/sysdep.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/mach/sysdep.h b/sysdeps/mach/sysdep.h index 1c869f5cb2..35ad1e3920 100644 --- a/sysdeps/mach/sysdep.h +++ b/sysdeps/mach/sysdep.h @@ -45,7 +45,7 @@ #ifndef __ASSEMBLER__ #define FATAL_PREPARE_INCLUDE <mach/mig_support.h> -#define FATAL_PREPARE __mig_dealloc_reply_port (MACH_PORT_NULL) +#define FATAL_PREPARE __mig_dealloc_reply_port (__mig_get_reply_port ()) #endif /* sysdeps/mach/MACHINE/sysdep.h should define the following macros. */ |