about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-02-15 14:31:50 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-02-15 14:32:37 +0000
commitca843defbcbd2dc95b9342189e5dc430e9bcb743 (patch)
tree9118ab569456af4cf97619b105da7565d826ffa0
parentb65a82e4e757c1e6cb7073916a29bf7ff3170529 (diff)
downloadglibc-ca843defbcbd2dc95b9342189e5dc430e9bcb743.tar.gz
glibc-ca843defbcbd2dc95b9342189e5dc430e9bcb743.tar.xz
glibc-ca843defbcbd2dc95b9342189e5dc430e9bcb743.zip
htl: Only check pthread_self coherency when DEBUG is set
htl has been widely tested for a long time now with this coherency
checked successfully.
-rw-r--r--sysdeps/mach/hurd/htl/pt-sysdep.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/htl/pt-sysdep.h b/sysdeps/mach/hurd/htl/pt-sysdep.h
index c837415a9a..484d024bb0 100644
--- a/sysdeps/mach/hurd/htl/pt-sysdep.h
+++ b/sysdeps/mach/hurd/htl/pt-sysdep.h
@@ -32,6 +32,7 @@
   mach_msg_header_t wakeupmsg;
 
 extern __thread struct __pthread *___pthread_self;
+#ifdef DEBUG
 #define _pthread_self()                                            \
 	({                                                         \
 	  struct __pthread *thread;                                \
@@ -46,6 +47,9 @@ extern __thread struct __pthread *___pthread_self;
                      ok; }));                                      \
           thread;                                                  \
          })
+#else
+#define _pthread_self() ___pthread_self
+#endif
 
 extern inline void
 __attribute__ ((__always_inline__))