From e0c05718cf312787f0b93398587571fee0b63240 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 15 Feb 2020 06:34:51 -0800 Subject: hurd: improve libpthread performance debian/patches/hurd-i386/git-pthread_self.diff: New patch --- debian/changelog | 2 ++ debian/patches/hurd-i386/git-pthread_self.diff | 31 ++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 34 insertions(+) create mode 100644 debian/patches/hurd-i386/git-pthread_self.diff (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c4394af7..68204043 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,8 @@ glibc (2.30-0experimental3) UNRELEASED; urgency=medium libpthread link. * debian/patches/hurd-i386/git-register-atfork.diff: Fix linking with static libpthread. + * debian/patches/hurd-i386/git-pthread_self.diff: New patch to improve + libpthread performance. [ Aurelien Jarno ] * debian/patches/any/local-revert-24323.diff: drop, obsolete. diff --git a/debian/patches/hurd-i386/git-pthread_self.diff b/debian/patches/hurd-i386/git-pthread_self.diff new file mode 100644 index 00000000..709c9759 --- /dev/null +++ b/debian/patches/hurd-i386/git-pthread_self.diff @@ -0,0 +1,31 @@ +commit ca843defbcbd2dc95b9342189e5dc430e9bcb743 +Author: Samuel Thibault +Date: Sat Feb 15 14:31:50 2020 +0000 + + 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. + +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__)) diff --git a/debian/patches/series b/debian/patches/series index f55954c5..35777999 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -85,6 +85,7 @@ hurd-i386/git-barrier-1.diff hurd-i386/git-sem-intr.diff hurd-i386/local-atfork-link.diff hurd-i386/git-register-atfork.diff +hurd-i386/git-pthread_self.diff i386/local-biarch.diff i386/unsubmitted-quiet-ldconfig.diff -- cgit v1.2.3