This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.27.9000-186-ga5df031


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  a5df0318ef30a4dcff3fa2cb82265f641813d9ea (commit)
      from  0d13dfa17b3bdf4f5ccc179869917cc65f009e7a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a5df0318ef30a4dcff3fa2cb82265f641813d9ea

commit a5df0318ef30a4dcff3fa2cb82265f641813d9ea
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Mar 4 19:11:26 2018 +0100

    hurd: add gscope support
    
    * elf/dl-support.c [!THREAD_GSCOPE_IN_TCB] (_dl_thread_gscope_count):
    Define variable.
    * sysdeps/generic/ldsodefs.h [!THREAD_GSCOPE_IN_TCB] (struct
    rtld_global): Add _dl_thread_gscope_count member.
    * sysdeps/mach/hurd/tls.h: Include <atomic.h>.
    [!defined __ASSEMBLER__] (THREAD_GSCOPE_GLOBAL, THREAD_GSCOPE_SET_FLAG,
    THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define macros.
    * sysdeps/generic/tls.h: Document THREAD_GSCOPE_IN_TCB.
    * sysdeps/aarch64/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/alpha/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/arm/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/hppa/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/i386/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/ia64/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/m68k/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/microblaze/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/mips/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/nios2/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/powerpc/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/riscv/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/s390/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/sh/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/sparc/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/tile/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.
    * sysdeps/x86_64/nptl/tls.h: Define THREAD_GSCOPE_IN_TCB to 1.

diff --git a/elf/dl-support.c b/elf/dl-support.c
index 114f77a..b5f10d5 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -188,6 +188,9 @@ int (*_dl_make_stack_executable_hook) (void **) = _dl_make_stack_executable;
 /* Function in libpthread to wait for termination of lookups.  */
 void (*_dl_wait_lookup_done) (void);
 
+#if !THREAD_GSCOPE_IN_TCB
+int _dl_thread_gscope_count;
+#endif
 struct dl_scope_free_list *_dl_scope_free_list;
 
 #ifdef NEED_DL_SYSINFO
diff --git a/sysdeps/aarch64/nptl/tls.h b/sysdeps/aarch64/nptl/tls.h
index ac39c24..200334f 100644
--- a/sysdeps/aarch64/nptl/tls.h
+++ b/sysdeps/aarch64/nptl/tls.h
@@ -109,6 +109,7 @@ typedef struct
   descr->member[idx] = (value)
 
 /* Get and set the global scope generation counter in struct pthread.  */
+# define THREAD_GSCOPE_IN_TCB      1
 # define THREAD_GSCOPE_FLAG_UNUSED 0
 # define THREAD_GSCOPE_FLAG_USED   1
 # define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h
index 084aba9..482c8f8 100644
--- a/sysdeps/alpha/nptl/tls.h
+++ b/sysdeps/alpha/nptl/tls.h
@@ -103,6 +103,7 @@ typedef struct
   descr->member[idx] = (value)
 
 /* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h
index bbe2cd8..ca0352d 100644
--- a/sysdeps/arm/nptl/tls.h
+++ b/sysdeps/arm/nptl/tls.h
@@ -100,6 +100,7 @@ typedef struct
   descr->member[idx] = (value)
 
 /* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 5e1b24e..d3013f6 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -435,6 +435,9 @@ struct rtld_global
     size_t count;
     void *list[50];
   } *_dl_scope_free_list;
+#if !THREAD_GSCOPE_IN_TCB
+  EXTERN int _dl_thread_gscope_count;
+#endif
 #ifdef SHARED
 };
 # define __rtld_global_attribute__
diff --git a/sysdeps/generic/tls.h b/sysdeps/generic/tls.h
index e66b8fd..01cbbeb 100644
--- a/sysdeps/generic/tls.h
+++ b/sysdeps/generic/tls.h
@@ -71,4 +71,10 @@
      This macro returns the address of the DTV of the current thread.
      This normally is done using the thread register which points
      to the dtv or the TCB (from which the DTV can found).
+
+
+     THREAD_GSCOPE_IN_TCB
+
+     This should be set to 1 if the global scope flag is stored within the TCB.
+     When set to 0, GL(_dl_thread_gscope_count) will be defined to store it.
   */
diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h
index a64b150..2b94e34 100644
--- a/sysdeps/hppa/nptl/tls.h
+++ b/sysdeps/hppa/nptl/tls.h
@@ -134,6 +134,7 @@ static inline void __set_cr27(struct pthread *cr27)
 }
 
 /* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/i386/nptl/tls.h b/sysdeps/i386/nptl/tls.h
index fcda135..8ca0924 100644
--- a/sysdeps/i386/nptl/tls.h
+++ b/sysdeps/i386/nptl/tls.h
@@ -411,6 +411,7 @@ tls_fill_user_desc (union user_desc_init *desc,
 
 
 /* Get and set the global scope generation counter in the TCB head.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/ia64/nptl/tls.h b/sysdeps/ia64/nptl/tls.h
index 80738f5..8760ee3 100644
--- a/sysdeps/ia64/nptl/tls.h
+++ b/sysdeps/ia64/nptl/tls.h
@@ -155,6 +155,7 @@ register struct pthread *__thread_self __asm__("r13");
    = THREAD_GET_POINTER_GUARD ())
 
 /* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/m68k/nptl/tls.h b/sysdeps/m68k/nptl/tls.h
index cadeb84..53be3a0 100644
--- a/sysdeps/m68k/nptl/tls.h
+++ b/sysdeps/m68k/nptl/tls.h
@@ -134,6 +134,7 @@ extern void * __m68k_read_tp (void);
 # define NO_TLS_OFFSET		-1
 
 /* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/mach/hurd/tls.h b/sysdeps/mach/hurd/tls.h
index faff87c..67c657b 100644
--- a/sysdeps/mach/hurd/tls.h
+++ b/sysdeps/mach/hurd/tls.h
@@ -27,6 +27,7 @@
 # include <sysdep.h>
 # include <mach/mig_errors.h>
 # include <mach.h>
+# include <atomic.h>
 
 
 /* This is the size of the initial TCB.  */
@@ -51,6 +52,26 @@
 # define GET_DTV(descr) \
   (((tcbhead_t *) (descr))->dtv)
 
+/* Global scope switch support.  */
+#define THREAD_GSCOPE_IN_TCB      0
+#define THREAD_GSCOPE_GLOBAL
+#define THREAD_GSCOPE_SET_FLAG() \
+  atomic_exchange_and_add_acq (&GL(dl_thread_gscope_count), 1)
+#define THREAD_GSCOPE_RESET_FLAG() \
+  do 									      \
+    if (atomic_exchange_and_add_rel (&GL(dl_thread_gscope_count), -1) == 1)   \
+      lll_wake (&GL(dl_thread_gscope_count), 0);			      \
+  while (0)
+#define THREAD_GSCOPE_WAIT() \
+  do 									      \
+    {									      \
+      int count;							      \
+      atomic_write_barrier ();						      \
+      while ((count = GL(dl_thread_gscope_count)))			      \
+        lll_wait (&GL(dl_thread_gscope_count), count, 0);		      \
+    }									      \
+  while (0)
+
 #endif /* !ASSEMBLER */
 
 
diff --git a/sysdeps/microblaze/nptl/tls.h b/sysdeps/microblaze/nptl/tls.h
index aa5e2dd..8b48974 100644
--- a/sysdeps/microblaze/nptl/tls.h
+++ b/sysdeps/microblaze/nptl/tls.h
@@ -116,6 +116,7 @@ typedef struct
   (descr->member[idx] = (value))
 
 /* Get and set the global scope generation counter in struct pthread.  */
+# define THREAD_GSCOPE_IN_TCB      1
 # define THREAD_GSCOPE_FLAG_UNUSED 0
 # define THREAD_GSCOPE_FLAG_USED   1
 # define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h
index 5f8cd21..777432f 100644
--- a/sysdeps/mips/nptl/tls.h
+++ b/sysdeps/mips/nptl/tls.h
@@ -159,6 +159,7 @@ typedef struct
 # define NO_TLS_OFFSET		-1
 
 /* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/nios2/nptl/tls.h b/sysdeps/nios2/nptl/tls.h
index 47c7a87..6fedb2a 100644
--- a/sysdeps/nios2/nptl/tls.h
+++ b/sysdeps/nios2/nptl/tls.h
@@ -137,6 +137,7 @@ register struct pthread *__thread_self __asm__("r23");
 # define NO_TLS_OFFSET		-1
 
 /* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/powerpc/nptl/tls.h b/sysdeps/powerpc/nptl/tls.h
index 2418998..f88fed5 100644
--- a/sysdeps/powerpc/nptl/tls.h
+++ b/sysdeps/powerpc/nptl/tls.h
@@ -236,6 +236,7 @@ register void *__thread_register __asm__ ("r13");
 # define NO_TLS_OFFSET		-1
 
 /* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/riscv/nptl/tls.h b/sysdeps/riscv/nptl/tls.h
index 4c92afc..7745d59 100644
--- a/sysdeps/riscv/nptl/tls.h
+++ b/sysdeps/riscv/nptl/tls.h
@@ -118,6 +118,7 @@ typedef struct
 # define NO_TLS_OFFSET		-1
 
 /* Get and set the global scope generation counter in struct pthread.  */
+# define THREAD_GSCOPE_IN_TCB      1
 # define THREAD_GSCOPE_FLAG_UNUSED 0
 # define THREAD_GSCOPE_FLAG_USED   1
 # define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/s390/nptl/tls.h b/sysdeps/s390/nptl/tls.h
index 63411e5..37692e9 100644
--- a/sysdeps/s390/nptl/tls.h
+++ b/sysdeps/s390/nptl/tls.h
@@ -169,6 +169,7 @@ typedef struct
 #define THREAD_COPY_POINTER_GUARD(descr)
 
 /* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/sh/nptl/tls.h b/sysdeps/sh/nptl/tls.h
index adb35ea..2585312 100644
--- a/sysdeps/sh/nptl/tls.h
+++ b/sysdeps/sh/nptl/tls.h
@@ -141,6 +141,7 @@ typedef struct
      ((tcbhead_t *) (descr + 1))->pointer_guard	= __tcbp->pointer_guard;})
 
 /* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/sparc/nptl/tls.h b/sysdeps/sparc/nptl/tls.h
index d8548f3..8a547f1 100644
--- a/sysdeps/sparc/nptl/tls.h
+++ b/sysdeps/sparc/nptl/tls.h
@@ -141,6 +141,7 @@ register struct pthread *__thread_self __asm__("%g7");
   ((descr)->header.pointer_guard = THREAD_GET_POINTER_GUARD ())
 
 /* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/tile/nptl/tls.h b/sysdeps/tile/nptl/tls.h
index 2cb3059..45d6c53 100644
--- a/sysdeps/tile/nptl/tls.h
+++ b/sysdeps/tile/nptl/tls.h
@@ -157,6 +157,7 @@ register void *__thread_pointer asm ("tp");
 # define NO_TLS_OFFSET		-1
 
 /* Get and set the global scope generation counter in struct pthread.  */
+#define THREAD_GSCOPE_IN_TCB      1
 #define THREAD_GSCOPE_FLAG_UNUSED 0
 #define THREAD_GSCOPE_FLAG_USED   1
 #define THREAD_GSCOPE_FLAG_WAIT   2
diff --git a/sysdeps/x86_64/nptl/tls.h b/sysdeps/x86_64/nptl/tls.h
index bdd0237..059f967 100644
--- a/sysdeps/x86_64/nptl/tls.h
+++ b/sysdeps/x86_64/nptl/tls.h
@@ -343,6 +343,7 @@ typedef struct
 
 
 /* Get and set the global scope generation counter in the TCB head.  */
+# define THREAD_GSCOPE_IN_TCB      1
 # define THREAD_GSCOPE_FLAG_UNUSED 0
 # define THREAD_GSCOPE_FLAG_USED   1
 # define THREAD_GSCOPE_FLAG_WAIT   2

-----------------------------------------------------------------------

Summary of changes:
 elf/dl-support.c              |    3 +++
 sysdeps/aarch64/nptl/tls.h    |    1 +
 sysdeps/alpha/nptl/tls.h      |    1 +
 sysdeps/arm/nptl/tls.h        |    1 +
 sysdeps/generic/ldsodefs.h    |    3 +++
 sysdeps/generic/tls.h         |    6 ++++++
 sysdeps/hppa/nptl/tls.h       |    1 +
 sysdeps/i386/nptl/tls.h       |    1 +
 sysdeps/ia64/nptl/tls.h       |    1 +
 sysdeps/m68k/nptl/tls.h       |    1 +
 sysdeps/mach/hurd/tls.h       |   21 +++++++++++++++++++++
 sysdeps/microblaze/nptl/tls.h |    1 +
 sysdeps/mips/nptl/tls.h       |    1 +
 sysdeps/nios2/nptl/tls.h      |    1 +
 sysdeps/powerpc/nptl/tls.h    |    1 +
 sysdeps/riscv/nptl/tls.h      |    1 +
 sysdeps/s390/nptl/tls.h       |    1 +
 sysdeps/sh/nptl/tls.h         |    1 +
 sysdeps/sparc/nptl/tls.h      |    1 +
 sysdeps/tile/nptl/tls.h       |    1 +
 sysdeps/x86_64/nptl/tls.h     |    1 +
 21 files changed, 50 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]