aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2025-08-17 17:49:54 +0200
committerH.J. Lu <hjl.tools@gmail.com>2025-08-20 11:48:27 -0700
commitb0f0c41a5fd82edb5435d0fd1f7beb161fd12873 (patch)
tree2837ebbb85b05f63614f8186f08e13dcd96bb829
parent0e49fc68aa1200eb20d13648f084122b2d65f908 (diff)
downloadglibc-b0f0c41a5fd82edb5435d0fd1f7beb161fd12873.zip
glibc-b0f0c41a5fd82edb5435d0fd1f7beb161fd12873.tar.gz
glibc-b0f0c41a5fd82edb5435d0fd1f7beb161fd12873.tar.bz2
x86_64: Remove stalled __GNUC_PREREQ (6, 0) test in THREAD_SELF()
Currenty GCC-12 is required as the minimum supported compiler version. Remove stalled __GNUC_PREREQ (6, 0) test for GCC compiler version in THREAD_SELF() macro definition. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Cc: H.J.Lu <hjl.tools@gmail.com> Cc: Florian Weimer <fweimer@redhat.com> Cc: Carlos O'Donell <carlos@redhat.com> Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
-rw-r--r--sysdeps/x86_64/nptl/tls.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/sysdeps/x86_64/nptl/tls.h b/sysdeps/x86_64/nptl/tls.h
index 551d342..29b028c 100644
--- a/sysdeps/x86_64/nptl/tls.h
+++ b/sysdeps/x86_64/nptl/tls.h
@@ -168,22 +168,9 @@ _Static_assert (offsetof (tcbhead_t, __glibc_unused2) == 0x80,
THREAD_GETMEM (__pd, header.dtv); })
-/* Return the thread descriptor for the current thread.
-
- The contained asm must *not* be marked volatile since otherwise
- assignments like
- pthread_descr self = thread_self();
- do not get optimized away. */
-# if __GNUC_PREREQ (6, 0)
+/* Return the thread descriptor for the current thread. */
# define THREAD_SELF \
(*(struct pthread *__seg_fs *) offsetof (struct pthread, header.self))
-# else
-# define THREAD_SELF \
- ({ struct pthread *__self; \
- asm ("mov %%fs:%c1,%0" : "=r" (__self) \
- : "i" (offsetof (struct pthread, header.self))); \
- __self;})
-# endif
/* Magic for libthread_db to know how to do THREAD_SELF. */
# define DB_THREAD_SELF_INCLUDE <sys/reg.h> /* For the FS constant. */