From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id A03121F8C6 for ; Tue, 14 Sep 2021 23:31:10 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 59E6A3857C66 for ; Tue, 14 Sep 2021 23:31:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 59E6A3857C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631662269; bh=HD9PqwnAHnLlY+cO8Hvt/+UtLyyE6lSWYwvKWvqIxMU=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Tjj66W1AKf1FBRNjQDybrS5s9QQaDHoSSvV46/LGPX7PfGj11lU5Pv12jJ43ymjFT lZ7eble/IUzWHhCXHIXHJgSiOJNKb1hY9Oj4qErMGuRqPO25Oagt0G19T7vxMLRqHX QqLwm0QIb3TqMpuWfV4EsOuu1zqqSepSMV7yVnWE= Received: from hera.aquilenet.fr (hera.aquilenet.fr [IPv6:2a0c:e300::1]) by sourceware.org (Postfix) with ESMTPS id 9EAA3385AC3D for ; Tue, 14 Sep 2021 23:29:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9EAA3385AC3D Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id B4183693; Wed, 15 Sep 2021 01:29:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wxF7C5tT6y4a; Wed, 15 Sep 2021 01:29:10 +0200 (CEST) Received: from begin (unknown [IPv6:2a01:cb19:956:1b00:de41:a9ff:fe47:ec49]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 2ED9F61; Wed, 15 Sep 2021 01:29:10 +0200 (CEST) Received: from samy by begin with local (Exim 4.95-RC2) (envelope-from ) id 1mQHrR-00DvXz-4s; Wed, 15 Sep 2021 01:29:09 +0200 Date: Wed, 15 Sep 2021 01:29:09 +0200 To: Sergey Bugaev Subject: Re: [PATCH htl v3 4/5] elf: Remove THREAD_GSCOPE_IN_TCB Message-ID: <20210914232909.7nzqwsnjf2cz2ml5@begin> Mail-Followup-To: Sergey Bugaev , libc-alpha@sourceware.org, bug-hurd@gnu.org References: <20210907133325.255690-1-bugaevc@gmail.com> <20210907133325.255690-5-bugaevc@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210907133325.255690-5-bugaevc@gmail.com> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spamd-Bar: -- X-Rspamd-Server: hera X-Rspamd-Queue-Id: B4183693 X-Spamd-Result: default: False [-2.50 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; BAYES_HAM(-3.00)[100.00%] X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Samuel Thibault via Libc-alpha Reply-To: Samuel Thibault Cc: bug-hurd@gnu.org, libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" Sergey Bugaev, le mar. 07 sept. 2021 16:33:24 +0300, a ecrit: > All the ports now have THREAD_GSCOPE_IN_TCB set to 1. Remove all > support for !THREAD_GSCOPE_IN_TCB, along with the definition itself. > > Signed-off-by: Sergey Bugaev And thus a nice cleanup, thanks! > --- > elf/dl-support.c | 3 --- > sysdeps/aarch64/nptl/tls.h | 1 - > sysdeps/alpha/nptl/tls.h | 1 - > sysdeps/arc/nptl/tls.h | 1 - > sysdeps/arm/nptl/tls.h | 1 - > sysdeps/csky/nptl/tls.h | 1 - > sysdeps/generic/ldsodefs.h | 6 ------ > 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/i386/tls.h | 2 -- > 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/x86_64/nptl/tls.h | 1 - > 22 files changed, 35 deletions(-) > > diff --git a/elf/dl-support.c b/elf/dl-support.c > index a317459fae..02e2ed72f5 100644 > --- a/elf/dl-support.c > +++ b/elf/dl-support.c > @@ -197,9 +197,6 @@ int _dl_stack_cache_lock; > int (*_dl_make_stack_executable_hook) (void **) = _dl_make_stack_executable; > void (*_dl_init_static_tls) (struct link_map *) = &_dl_nothread_init_static_tls; > #endif > -#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 6e896207a6..72f22dc718 100644 > --- a/sysdeps/aarch64/nptl/tls.h > +++ b/sysdeps/aarch64/nptl/tls.h > @@ -109,7 +109,6 @@ 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 4dbccc5249..6328112135 100644 > --- a/sysdeps/alpha/nptl/tls.h > +++ b/sysdeps/alpha/nptl/tls.h > @@ -103,7 +103,6 @@ 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/arc/nptl/tls.h b/sysdeps/arc/nptl/tls.h > index 95300fdd21..e269c0a7a5 100644 > --- a/sysdeps/arc/nptl/tls.h > +++ b/sysdeps/arc/nptl/tls.h > @@ -111,7 +111,6 @@ 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 1bd11307ce..699c16acfb 100644 > --- a/sysdeps/arm/nptl/tls.h > +++ b/sysdeps/arm/nptl/tls.h > @@ -100,7 +100,6 @@ 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/csky/nptl/tls.h b/sysdeps/csky/nptl/tls.h > index 7a234041ed..b210dfcb76 100644 > --- a/sysdeps/csky/nptl/tls.h > +++ b/sysdeps/csky/nptl/tls.h > @@ -127,7 +127,6 @@ 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 3092bbc924..b251fd1733 100644 > --- a/sysdeps/generic/ldsodefs.h > +++ b/sysdeps/generic/ldsodefs.h > @@ -495,10 +495,6 @@ struct rtld_global > EXTERN struct __pthread **_dl_pthread_threads; > EXTERN int _dl_pthread_threads_lock; > #endif > - > -#if !THREAD_GSCOPE_IN_TCB > - EXTERN int _dl_thread_gscope_count; > -#endif > #ifdef SHARED > }; > # define __rtld_global_attribute__ > @@ -1381,10 +1377,8 @@ __rtld_mutex_init (void) > } > #endif /* !PTHREAD_IN_LIBC */ > > -#if THREAD_GSCOPE_IN_TCB > void __thread_gscope_wait (void) attribute_hidden; > # define THREAD_GSCOPE_WAIT() __thread_gscope_wait () > -#endif > > __END_DECLS > > diff --git a/sysdeps/generic/tls.h b/sysdeps/generic/tls.h > index e86d70e6ce..f581c9a992 100644 > --- a/sysdeps/generic/tls.h > +++ b/sysdeps/generic/tls.h > @@ -71,10 +71,4 @@ > 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 857003a7d3..55559eb327 100644 > --- a/sysdeps/hppa/nptl/tls.h > +++ b/sysdeps/hppa/nptl/tls.h > @@ -134,7 +134,6 @@ 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 86ee1ef302..cfb27f5ccd 100644 > --- a/sysdeps/i386/nptl/tls.h > +++ b/sysdeps/i386/nptl/tls.h > @@ -375,7 +375,6 @@ 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 66d9bf3189..8c26728859 100644 > --- a/sysdeps/ia64/nptl/tls.h > +++ b/sysdeps/ia64/nptl/tls.h > @@ -155,7 +155,6 @@ 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 dd526cdc2e..34906b1c13 100644 > --- a/sysdeps/m68k/nptl/tls.h > +++ b/sysdeps/m68k/nptl/tls.h > @@ -132,7 +132,6 @@ 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/i386/tls.h b/sysdeps/mach/hurd/i386/tls.h > index 2ac65df921..c70ea73a81 100644 > --- a/sysdeps/mach/hurd/i386/tls.h > +++ b/sysdeps/mach/hurd/i386/tls.h > @@ -370,8 +370,6 @@ _hurd_tls_new (thread_t child, struct i386_thread_state *state, tcbhead_t *tcb) > } > > /* Global scope switch support. */ > -# 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/microblaze/nptl/tls.h b/sysdeps/microblaze/nptl/tls.h > index c93d90b11b..0ca67a777d 100644 > --- a/sysdeps/microblaze/nptl/tls.h > +++ b/sysdeps/microblaze/nptl/tls.h > @@ -116,7 +116,6 @@ 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 c09f49071c..04e823b4c7 100644 > --- a/sysdeps/mips/nptl/tls.h > +++ b/sysdeps/mips/nptl/tls.h > @@ -158,7 +158,6 @@ 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 02a05b4e74..fd484135f4 100644 > --- a/sysdeps/nios2/nptl/tls.h > +++ b/sysdeps/nios2/nptl/tls.h > @@ -137,7 +137,6 @@ 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 6c779b6609..cc93c44964 100644 > --- a/sysdeps/powerpc/nptl/tls.h > +++ b/sysdeps/powerpc/nptl/tls.h > @@ -231,7 +231,6 @@ 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/riscv/nptl/tls.h b/sysdeps/riscv/nptl/tls.h > index 5350bcc049..e4bd736feb 100644 > --- a/sysdeps/riscv/nptl/tls.h > +++ b/sysdeps/riscv/nptl/tls.h > @@ -119,7 +119,6 @@ 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 efb52515e0..804486dfdd 100644 > --- a/sysdeps/s390/nptl/tls.h > +++ b/sysdeps/s390/nptl/tls.h > @@ -165,7 +165,6 @@ 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 ac3c9a9e85..2a9ee1def1 100644 > --- a/sysdeps/sh/nptl/tls.h > +++ b/sysdeps/sh/nptl/tls.h > @@ -141,7 +141,6 @@ 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 dd1eb82a59..55955f376a 100644 > --- a/sysdeps/sparc/nptl/tls.h > +++ b/sysdeps/sparc/nptl/tls.h > @@ -138,7 +138,6 @@ 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/x86_64/nptl/tls.h b/sysdeps/x86_64/nptl/tls.h > index a78c4f4d01..b0d044353b 100644 > --- a/sysdeps/x86_64/nptl/tls.h > +++ b/sysdeps/x86_64/nptl/tls.h > @@ -326,7 +326,6 @@ _Static_assert (offsetof (tcbhead_t, __glibc_unused2) == 0x80, > > > /* 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 > -- > 2.31.1 > -- Samuel In mutt, type cthis Dans mutt, taper cceci