From patchwork Tue Jun 21 20:32:25 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: 55241 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 65583385AE57 for ; Tue, 21 Jun 2022 20:36:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 65583385AE57 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1655843760; bh=q9O7Nq0vL6r2StGhNtOXsVa67tVfwqodqWabd9RqKcQ=; 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=lx6wCwqJr0yjbNIuYJmesx3eF1Xpz23vM2dB+Tg7LF9pR2pa0GTF3QdKQLyoFlxVM 7hxSfea0bJd+wQorupTuDEkGJ8xnkCoDflangW6G7VesUqkSjwiNW1ZQ6WGIozxPSq xSIW/M/iOKeGPVjtKCvhlwmTlW93E37lQs4OeElg= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 84792385AE66 for ; Tue, 21 Jun 2022 20:32:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 84792385AE66 Received: by mail-oi1-x22c.google.com with SMTP id u9so18533611oiv.12 for ; Tue, 21 Jun 2022 13:32:37 -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=q9O7Nq0vL6r2StGhNtOXsVa67tVfwqodqWabd9RqKcQ=; b=Csz+fj5dXvVfwgDGgXy5/bEet3Xb+RAnN8ZnmhEGUaaQ2XWHj+yff+H5EvC+Vti2JJ XNubn8GTHUBJCpXrYStBQlay7ekfKROkKFkFswdo++8oNW2II0X3ZEHulq9/vfZizC5T XWVZ5sKJuo2F8jQEry8fE7t1FAtWc4t9lz51p/OUKyFEq1Z88tmRpcU3iWxu8QL1w80L LkuTOgi+DITiR1kViTQJ2SYBl2nEgPvPVtgNA2vqVlFd1jeg6jyif5N+oSE/si2LXXQ2 rQoASCyJVi/GaqPob8bbpx2EiUKm0WAiaonkAU+jsHS7L3gMH3ohvF0jlrxVjuFmfBVr ABAQ== X-Gm-Message-State: AJIora8z5u/keEcF4RQV6j+L3B6TVKYBTG9oEueaJsc0YLQomN51/YNl xMgkfUEaI4JkQHeOIw9CKUf1pqxGMWEXgQ== X-Google-Smtp-Source: AGRyM1tXEDpsMOmdR8Nzuv1KgnPRdCzTJwI/scqJpzlBG+kVo9MmhXWoDlItWaxHuLZok+2R50rKNQ== X-Received: by 2002:a05:6808:f04:b0:334:379d:ae03 with SMTP id m4-20020a0568080f0400b00334379dae03mr448145oiw.24.1655843556539; Tue, 21 Jun 2022 13:32:36 -0700 (PDT) Received: from birita.. ([2804:431:c7ca:6d95:e2fc:bea2:ccdc:f4a]) by smtp.gmail.com with ESMTPSA id v21-20020a056870e49500b00101f9e87b39sm3779567oag.11.2022.06.21.13.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 13:32:36 -0700 (PDT) To: libc-alpha@sourceware.org, Wilco Dijkstra , Fangrui Song Subject: [PATCH v3 4/4] Remove single-thread.h Date: Tue, 21 Jun 2022 17:32:25 -0300 Message-Id: <20220621203225.714328-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220621203225.714328-1-adhemerval.zanella@linaro.org> References: <20220621203225.714328-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.5 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 | 13 ++++++-- 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, 11 insertions(+), 78 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 2015742be0..f42e40547e 100644 --- a/include/sys/single_threaded.h +++ b/include/sys/single_threaded.h @@ -1,6 +1,7 @@ -#include +#ifndef __ASSEMBLER__ +# include -#ifndef _ISOMAC +# ifndef _ISOMAC libc_hidden_proto_alias (__libc_single_threaded, __libc_single_threaded_internal); @@ -9,4 +10,10 @@ libc_hidden_proto_alias (__libc_single_threaded, # define __libc_single_threaded_internal __libc_single_threaded #endif -#endif +# define SINGLE_THREAD_P (__libc_single_threaded_internal != 0) + +# define RTLD_SINGLE_THREAD_P SINGLE_THREAD_P + +# 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 2099848cf3..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_internal != 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