From patchwork Fri Jun 10 16:35:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 55025 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3D832382D46E for ; Fri, 10 Jun 2022 16:39:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D832382D46E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1654879157; bh=PKpyTKcdx9tEukaQbE7GhEKl0y9FxcY22LMoVYZmow0=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=vmV63btYnDuUr4jpl8snQ6DmBFJvsLhOwB5x83xIZAQNRal3lOhslIsSYQc2xFK38 RgBTvN9wNBH/rDrE+bF/JEakvnQHHLeAv63JFmh7NLEdeWiGNviCTbJ3ghdLVJgL2A PZ5uHoC1g06dhwA1q849kg9tmjQTfgFPObfiZ/M0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id 732D5392AC29 for ; Fri, 10 Jun 2022 16:36:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 732D5392AC29 Received: by mail-oi1-x229.google.com with SMTP id k24so9479614oij.2 for ; Fri, 10 Jun 2022 09:36:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PKpyTKcdx9tEukaQbE7GhEKl0y9FxcY22LMoVYZmow0=; b=At4c0vHKXEYTwS2LxiHuAdVcYdDd8KhzUPzbqCurG/smE3FxS5E0dOIjMP2WdcM2Fm ZqJm4u9smFB1Nyg5s+NAW89VN8Y0S+Swx/bDiuMpgyizb/oJhzHxBd9Ih2SVr0pzU52f 4ocnQSJGXz+heznd3kcLTlUl9orjGXnSySLU7Pw1FL4ie28nbQzAdRyqk5IwCmg3hR1Y 3tfgKcMTswh8cA9DnvoZ77zjDcka2PCeDaQfsMIhEZB3g44dXL7dYtzq0JQDkEnObn8l qgvqAoemWsXs5tEehH8yB9nDwG78PZom8I5iXuEKgWXZGNlmE+oXmChvDAbQyaI3PrP/ HqXA== X-Gm-Message-State: AOAM5316namSgXnzSZ+7EOzpgpCPN34mNaY6Ch5T6u6rWA0PZhd5/enN oZc2p/kWUq6FL10DGFrr6M2vHbL2QjbafQ== X-Google-Smtp-Source: ABdhPJy2QmBaDqaxtx+u3pytSXDffKxTYv8mvYL8uAdh4qT2MMRHq9msQ+jDmIk7JF5bk4GScpplHg== X-Received: by 2002:a05:6808:2383:b0:32e:72a1:bd6e with SMTP id bp3-20020a056808238300b0032e72a1bd6emr383475oib.240.1654878963535; Fri, 10 Jun 2022 09:36:03 -0700 (PDT) Received: from birita.. ([2804:431:c7cb:a613:818b:b86c:a3f8:d455]) by smtp.gmail.com with ESMTPSA id p203-20020aca42d4000000b0032efe5871b0sm1262424oia.45.2022.06.10.09.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 09:36:03 -0700 (PDT) To: libc-alpha@sourceware.org, Wilco Dijkstra Subject: [PATCH v2 4/4] Remove single-thread.h Date: Fri, 10 Jun 2022 13:35:52 -0300 Message-Id: <20220610163552.3587064-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220610163552.3587064-1-adhemerval.zanella@linaro.org> References: <20220610163552.3587064-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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: , X-Patchwork-Original-From: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" And move SINGLE_THREAD_P macro to sys/single_threaded.h. --- include/sys/single_threaded.h | 15 +++++++--- sysdeps/generic/single-thread.h | 25 ---------------- sysdeps/mach/hurd/sysdep-cancel.h | 5 ---- sysdeps/unix/sysdep.h | 2 +- .../unix/sysv/linux/aarch64/single-thread.h | 2 -- sysdeps/unix/sysv/linux/arc/single-thread.h | 2 -- sysdeps/unix/sysv/linux/arm/single-thread.h | 2 -- sysdeps/unix/sysv/linux/hppa/single-thread.h | 2 -- .../sysv/linux/microblaze/single-thread.h | 2 -- sysdeps/unix/sysv/linux/s390/single-thread.h | 2 -- sysdeps/unix/sysv/linux/single-thread.h | 30 ------------------- .../unix/sysv/linux/x86_64/single-thread.h | 2 -- 12 files changed, 12 insertions(+), 79 deletions(-) delete mode 100644 sysdeps/generic/single-thread.h delete mode 100644 sysdeps/unix/sysv/linux/aarch64/single-thread.h delete mode 100644 sysdeps/unix/sysv/linux/arc/single-thread.h delete mode 100644 sysdeps/unix/sysv/linux/arm/single-thread.h delete mode 100644 sysdeps/unix/sysv/linux/hppa/single-thread.h delete mode 100644 sysdeps/unix/sysv/linux/microblaze/single-thread.h delete mode 100644 sysdeps/unix/sysv/linux/s390/single-thread.h delete mode 100644 sysdeps/unix/sysv/linux/single-thread.h delete mode 100644 sysdeps/unix/sysv/linux/x86_64/single-thread.h diff --git a/include/sys/single_threaded.h b/include/sys/single_threaded.h index 258b01e0b2..c08bd52ab8 100644 --- a/include/sys/single_threaded.h +++ b/include/sys/single_threaded.h @@ -1,12 +1,19 @@ -#include +#ifndef __ASSEMBLER__ +# include -#ifndef _ISOMAC +# ifndef _ISOMAC libc_hidden_proto (__libc_single_threaded); -# ifdef SHARED +# ifdef SHARED extern __typeof (__libc_single_threaded) *__libc_external_single_threaded attribute_hidden; +# endif + +# define SINGLE_THREAD_P (__libc_single_threaded != 0) + +# define RTLD_SINGLE_THREAD_P SINGLE_THREAD_P + # endif -#endif +#endif /* __ASSEMBLER__ */ diff --git a/sysdeps/generic/single-thread.h b/sysdeps/generic/single-thread.h deleted file mode 100644 index 7f8222b38a..0000000000 --- a/sysdeps/generic/single-thread.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Single thread optimization, generic version. - Copyright (C) 2019-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _SINGLE_THREAD_H -#define _SINGLE_THREAD_H - -#define SINGLE_THREAD_P (0) -#define RTLD_SINGLE_THREAD_P (0) - -#endif /* _SINGLE_THREAD_H */ diff --git a/sysdeps/mach/hurd/sysdep-cancel.h b/sysdeps/mach/hurd/sysdep-cancel.h index 669c17151a..9311367ab9 100644 --- a/sysdeps/mach/hurd/sysdep-cancel.h +++ b/sysdeps/mach/hurd/sysdep-cancel.h @@ -6,11 +6,6 @@ void __pthread_disable_asynccancel (int oldtype); #pragma weak __pthread_enable_asynccancel #pragma weak __pthread_disable_asynccancel -/* Always multi-thread (since there's at least the sig handler), but no - handling enabled. */ -#define SINGLE_THREAD_P (0) -#define RTLD_SINGLE_THREAD_P (0) - #define LIBC_CANCEL_ASYNC() ({ \ int __cancel_oldtype = 0; \ if (__pthread_enable_asynccancel) \ diff --git a/sysdeps/unix/sysdep.h b/sysdeps/unix/sysdep.h index a1d9df4c73..a8abecb92b 100644 --- a/sysdeps/unix/sysdep.h +++ b/sysdeps/unix/sysdep.h @@ -16,7 +16,7 @@ . */ #include -#include +#include #include #define HAVE_SYSCALLS diff --git a/sysdeps/unix/sysv/linux/aarch64/single-thread.h b/sysdeps/unix/sysv/linux/aarch64/single-thread.h deleted file mode 100644 index a5d3a2aaf4..0000000000 --- a/sysdeps/unix/sysv/linux/aarch64/single-thread.h +++ /dev/null @@ -1,2 +0,0 @@ -#define SINGLE_THREAD_BY_GLOBAL -#include_next diff --git a/sysdeps/unix/sysv/linux/arc/single-thread.h b/sysdeps/unix/sysv/linux/arc/single-thread.h deleted file mode 100644 index a5d3a2aaf4..0000000000 --- a/sysdeps/unix/sysv/linux/arc/single-thread.h +++ /dev/null @@ -1,2 +0,0 @@ -#define SINGLE_THREAD_BY_GLOBAL -#include_next diff --git a/sysdeps/unix/sysv/linux/arm/single-thread.h b/sysdeps/unix/sysv/linux/arm/single-thread.h deleted file mode 100644 index a5d3a2aaf4..0000000000 --- a/sysdeps/unix/sysv/linux/arm/single-thread.h +++ /dev/null @@ -1,2 +0,0 @@ -#define SINGLE_THREAD_BY_GLOBAL -#include_next diff --git a/sysdeps/unix/sysv/linux/hppa/single-thread.h b/sysdeps/unix/sysv/linux/hppa/single-thread.h deleted file mode 100644 index a5d3a2aaf4..0000000000 --- a/sysdeps/unix/sysv/linux/hppa/single-thread.h +++ /dev/null @@ -1,2 +0,0 @@ -#define SINGLE_THREAD_BY_GLOBAL -#include_next diff --git a/sysdeps/unix/sysv/linux/microblaze/single-thread.h b/sysdeps/unix/sysv/linux/microblaze/single-thread.h deleted file mode 100644 index a5d3a2aaf4..0000000000 --- a/sysdeps/unix/sysv/linux/microblaze/single-thread.h +++ /dev/null @@ -1,2 +0,0 @@ -#define SINGLE_THREAD_BY_GLOBAL -#include_next diff --git a/sysdeps/unix/sysv/linux/s390/single-thread.h b/sysdeps/unix/sysv/linux/s390/single-thread.h deleted file mode 100644 index a5d3a2aaf4..0000000000 --- a/sysdeps/unix/sysv/linux/s390/single-thread.h +++ /dev/null @@ -1,2 +0,0 @@ -#define SINGLE_THREAD_BY_GLOBAL -#include_next diff --git a/sysdeps/unix/sysv/linux/single-thread.h b/sysdeps/unix/sysv/linux/single-thread.h deleted file mode 100644 index dd80e82c82..0000000000 --- a/sysdeps/unix/sysv/linux/single-thread.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Single thread optimization, Linux version. - Copyright (C) 2019-2022 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#ifndef _SINGLE_THREAD_H -#define _SINGLE_THREAD_H - -#ifndef __ASSEMBLER__ -# include -#endif - -#define SINGLE_THREAD_P (__libc_single_threaded != 0) - -#define RTLD_SINGLE_THREAD_P SINGLE_THREAD_P - -#endif /* _SINGLE_THREAD_H */ diff --git a/sysdeps/unix/sysv/linux/x86_64/single-thread.h b/sysdeps/unix/sysv/linux/x86_64/single-thread.h deleted file mode 100644 index a5d3a2aaf4..0000000000 --- a/sysdeps/unix/sysv/linux/x86_64/single-thread.h +++ /dev/null @@ -1,2 +0,0 @@ -#define SINGLE_THREAD_BY_GLOBAL -#include_next