From patchwork Thu Dec 16 19:42:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 49024 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 9A18B3858014 for ; Thu, 16 Dec 2021 19:45:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A18B3858014 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1639683943; bh=BcRfPucTfpksjJE+LEX8GlVjdP1q8LpiX/1FgFfiw4o=; 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=IwBuI8cL034LZ8VpNwtZXhWN/0yABn/Gtbp9fbuR30Ic2ONmPsNv9BDuu1UGNQgsY vop61SsTo2vpyjfHYfRVaH8mV/SZDDCnpxViPsrVikFUkeo3A6DhjKimac4m0oXhsP X2BSgic7Rxyc/eJhrWOSf38HVa1440CpL4j1Rj8M= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) by sourceware.org (Postfix) with ESMTPS id 8574C385800C for ; Thu, 16 Dec 2021 19:42:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8574C385800C Received: by mail-qv1-xf31.google.com with SMTP id kc16so302982qvb.3 for ; Thu, 16 Dec 2021 11:42:31 -0800 (PST) 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=BcRfPucTfpksjJE+LEX8GlVjdP1q8LpiX/1FgFfiw4o=; b=svrM5sOVtaBrUUH+YObE54G68nitf/b+w5IUHqqlvkSQ+lzrEpnO/Vkb4F6rXGpTgs dBh5yPzuSiEwP+Y+RkhUznKi/BE+G9eq0gHfFQlv/5GO3G4u2SMg5rdcKGVMbvlLbs6+ qfu3s41FU5npT2LCDEwCq/BIlnPJKmMRE2dCx3Np37v3wjvTjmblmytNnS8M0cqNW9P3 PF9sVEq9t3HlTCX4L2d386Woq0uPnlqayHoeDTCypU2DZ8++liTvLoeOBYlq5d9IJW78 Ppzm7Cx4JQFL9K/onYi2NwbFMTyF8vW8CXMCzXG8VBb3m+sDlKCnDLKeZa2vY0g1+i9s SLtw== X-Gm-Message-State: AOAM532Ajz2969HyVn3bu098Zu+j8F5YBlcK6X/RKgqk+aiUYaz3yu43 oHicMUDCLKNAjowhPllsT4PKoMXf6ry+gQ== X-Google-Smtp-Source: ABdhPJx7fO++qawdRMK5ORCPUnZY81zUvEI5y0m63ok0NRlxnaTUYwVH8xERmfWqGU/wVq8OnzuDBA== X-Received: by 2002:a0c:8e08:: with SMTP id v8mr12826791qvb.93.1639683750700; Thu, 16 Dec 2021 11:42:30 -0800 (PST) Received: from birita.. ([2804:431:c7ca:103f:96e9:fe91:2aff:a44d]) by smtp.gmail.com with ESMTPSA id br13sm3503836qkb.10.2021.12.16.11.42.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Dec 2021 11:42:30 -0800 (PST) To: libc-alpha@sourceware.org, Stafford Horne Subject: [PATCH 3/5] Remove atomic-machine.h boilerplates definition Date: Thu, 16 Dec 2021 16:42:20 -0300 Message-Id: <20211216194222.186992-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211216194222.186992-1-adhemerval.zanella@linaro.org> References: <20211216194222.186992-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 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 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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" Now that memusage.c uses C11 atomics we can remove them. --- sysdeps/aarch64/atomic-machine.h | 17 -------- sysdeps/alpha/atomic-machine.h | 27 +------------ sysdeps/arc/atomic-machine.h | 12 ------ sysdeps/arm/atomic-machine.h | 17 -------- sysdeps/csky/atomic-machine.h | 10 ----- sysdeps/ia64/atomic-machine.h | 26 ------------ sysdeps/m68k/coldfire/atomic-machine.h | 31 -------------- sysdeps/m68k/m680x0/m68020/atomic-machine.h | 28 ------------- sysdeps/microblaze/atomic-machine.h | 17 -------- sysdeps/mips/atomic-machine.h | 17 -------- sysdeps/powerpc/atomic-machine.h | 17 -------- sysdeps/s390/atomic-machine.h | 27 ------------- sysdeps/sparc/atomic-machine.h | 27 ------------- sysdeps/unix/sysv/linux/hppa/atomic-machine.h | 17 -------- .../sysv/linux/m68k/coldfire/atomic-machine.h | 11 ----- .../unix/sysv/linux/nios2/atomic-machine.h | 12 ------ .../unix/sysv/linux/riscv/atomic-machine.h | 13 ------ sysdeps/unix/sysv/linux/sh/atomic-machine.h | 28 ------------- sysdeps/x86/atomic-machine.h | 40 ++++--------------- 19 files changed, 8 insertions(+), 386 deletions(-) diff --git a/sysdeps/aarch64/atomic-machine.h b/sysdeps/aarch64/atomic-machine.h index 44f55d424d..6056737e0d 100644 --- a/sysdeps/aarch64/atomic-machine.h +++ b/sysdeps/aarch64/atomic-machine.h @@ -19,23 +19,6 @@ #ifndef _AARCH64_ATOMIC_MACHINE_H #define _AARCH64_ATOMIC_MACHINE_H 1 -#include - -typedef int8_t atomic8_t; -typedef int16_t atomic16_t; -typedef int32_t atomic32_t; -typedef int64_t atomic64_t; - -typedef uint8_t uatomic8_t; -typedef uint16_t uatomic16_t; -typedef uint32_t uatomic32_t; -typedef uint64_t uatomic64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define __HAVE_64B_ATOMICS 1 #define USE_ATOMIC_COMPILER_BUILTINS 1 #define ATOMIC_EXCHANGE_USES_CAS 0 diff --git a/sysdeps/alpha/atomic-machine.h b/sysdeps/alpha/atomic-machine.h index 201b8cf836..2c93e14653 100644 --- a/sysdeps/alpha/atomic-machine.h +++ b/sysdeps/alpha/atomic-machine.h @@ -17,31 +17,6 @@ #include -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int16_t atomic16_t; -typedef uint16_t uatomic16_t; -typedef int_fast16_t atomic_fast16_t; -typedef uint_fast16_t uatomic_fast16_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef int64_t atomic64_t; -typedef uint64_t uatomic64_t; -typedef int_fast64_t atomic_fast64_t; -typedef uint_fast64_t uatomic_fast64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define __HAVE_64B_ATOMICS 1 #define USE_ATOMIC_COMPILER_BUILTINS 0 @@ -127,7 +102,7 @@ typedef uintmax_t uatomic_max_t; : [__prev] "=&r" (__prev), \ [__cmp] "=&r" (__cmp) \ : [__mem] "m" (*(mem)), \ - [__old] "Ir" ((uint64_t)(atomic32_t)(uint64_t)(old)), \ + [__old] "Ir" ((uint64_t)(int32_t)(uint64_t)(old)), \ [__new] "Ir" (new) \ : "memory"); \ }) diff --git a/sysdeps/arc/atomic-machine.h b/sysdeps/arc/atomic-machine.h index 4cffc97f20..2080aaabfc 100644 --- a/sysdeps/arc/atomic-machine.h +++ b/sysdeps/arc/atomic-machine.h @@ -19,18 +19,6 @@ #ifndef _ARC_BITS_ATOMIC_H #define _ARC_BITS_ATOMIC_H 1 -#include - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define __HAVE_64B_ATOMICS 0 #define USE_ATOMIC_COMPILER_BUILTINS 1 diff --git a/sysdeps/arm/atomic-machine.h b/sysdeps/arm/atomic-machine.h index 7928ff29d8..b439be9bfc 100644 --- a/sysdeps/arm/atomic-machine.h +++ b/sysdeps/arm/atomic-machine.h @@ -16,23 +16,6 @@ License along with the GNU C Library. If not, see . */ -#include - -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define __HAVE_64B_ATOMICS 0 #define USE_ATOMIC_COMPILER_BUILTINS 0 #define ATOMIC_EXCHANGE_USES_CAS 1 diff --git a/sysdeps/csky/atomic-machine.h b/sysdeps/csky/atomic-machine.h index 7544c50413..4cd9f87aad 100644 --- a/sysdeps/csky/atomic-machine.h +++ b/sysdeps/csky/atomic-machine.h @@ -19,16 +19,6 @@ #ifndef __CSKY_ATOMIC_H_ #define __CSKY_ATOMIC_H_ -#include - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define __HAVE_64B_ATOMICS 0 #define USE_ATOMIC_COMPILER_BUILTINS 1 #define ATOMIC_EXCHANGE_USES_CAS 1 diff --git a/sysdeps/ia64/atomic-machine.h b/sysdeps/ia64/atomic-machine.h index 8b7cefbd99..6f0b44ef03 100644 --- a/sysdeps/ia64/atomic-machine.h +++ b/sysdeps/ia64/atomic-machine.h @@ -15,34 +15,8 @@ License along with the GNU C Library; if not, see . */ -#include #include -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int16_t atomic16_t; -typedef uint16_t uatomic16_t; -typedef int_fast16_t atomic_fast16_t; -typedef uint_fast16_t uatomic_fast16_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef int64_t atomic64_t; -typedef uint64_t uatomic64_t; -typedef int_fast64_t atomic_fast64_t; -typedef uint_fast64_t uatomic_fast64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define __HAVE_64B_ATOMICS 1 #define USE_ATOMIC_COMPILER_BUILTINS 0 diff --git a/sysdeps/m68k/coldfire/atomic-machine.h b/sysdeps/m68k/coldfire/atomic-machine.h index eae9240a35..23dae68439 100644 --- a/sysdeps/m68k/coldfire/atomic-machine.h +++ b/sysdeps/m68k/coldfire/atomic-machine.h @@ -18,37 +18,6 @@ #ifndef _ATOMIC_MACHINE_H #define _ATOMIC_MACHINE_H 1 -#include - -/* Coldfire has no atomic compare-and-exchange operation, and the - kernel provides no userspace atomicity operations. Here we just - use generic non-atomic implementations instead. */ - -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int16_t atomic16_t; -typedef uint16_t uatomic16_t; -typedef int_fast16_t atomic_fast16_t; -typedef uint_fast16_t uatomic_fast16_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef int64_t atomic64_t; -typedef uint64_t uatomic64_t; -typedef int_fast64_t atomic_fast64_t; -typedef uint_fast64_t uatomic_fast64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - /* If we have just non-atomic operations, we can as well make them wide. */ #define __HAVE_64B_ATOMICS 1 #define USE_ATOMIC_COMPILER_BUILTINS 0 diff --git a/sysdeps/m68k/m680x0/m68020/atomic-machine.h b/sysdeps/m68k/m680x0/m68020/atomic-machine.h index 7c8c8e75c9..bbf4f1b07d 100644 --- a/sysdeps/m68k/m680x0/m68020/atomic-machine.h +++ b/sysdeps/m68k/m680x0/m68020/atomic-machine.h @@ -15,34 +15,6 @@ License along with the GNU C Library. If not, see . */ -#include - - -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int16_t atomic16_t; -typedef uint16_t uatomic16_t; -typedef int_fast16_t atomic_fast16_t; -typedef uint_fast16_t uatomic_fast16_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef int64_t atomic64_t; -typedef uint64_t uatomic64_t; -typedef int_fast64_t atomic_fast64_t; -typedef uint_fast64_t uatomic_fast64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define __HAVE_64B_ATOMICS 1 #define USE_ATOMIC_COMPILER_BUILTINS 0 diff --git a/sysdeps/microblaze/atomic-machine.h b/sysdeps/microblaze/atomic-machine.h index 365402eeb0..d9cfa7f9c4 100644 --- a/sysdeps/microblaze/atomic-machine.h +++ b/sysdeps/microblaze/atomic-machine.h @@ -16,25 +16,8 @@ License along with the GNU C Library. If not, see . */ -#include #include - -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define __HAVE_64B_ATOMICS 0 #define USE_ATOMIC_COMPILER_BUILTINS 0 diff --git a/sysdeps/mips/atomic-machine.h b/sysdeps/mips/atomic-machine.h index e946b9d395..47752ee53e 100644 --- a/sysdeps/mips/atomic-machine.h +++ b/sysdeps/mips/atomic-machine.h @@ -19,25 +19,8 @@ #ifndef _MIPS_ATOMIC_MACHINE_H #define _MIPS_ATOMIC_MACHINE_H 1 -#include -#include #include -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef int64_t atomic64_t; -typedef uint64_t uatomic64_t; -typedef int_fast64_t atomic_fast64_t; -typedef uint_fast64_t uatomic_fast64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #if _MIPS_SIM == _ABIO32 && __mips < 2 #define MIPS_PUSH_MIPS2 ".set mips2\n\t" #else diff --git a/sysdeps/powerpc/atomic-machine.h b/sysdeps/powerpc/atomic-machine.h index 7535ba5d19..c0e7f6503f 100644 --- a/sysdeps/powerpc/atomic-machine.h +++ b/sysdeps/powerpc/atomic-machine.h @@ -25,23 +25,6 @@ * as appropriate and which in turn include this file. */ -#include - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef int64_t atomic64_t; -typedef uint64_t uatomic64_t; -typedef int_fast64_t atomic_fast64_t; -typedef uint_fast64_t uatomic_fast64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - /* * Powerpc does not have byte and halfword forms of load and reserve and * store conditional. So for powerpc we stub out the 8- and 16-bit forms. diff --git a/sysdeps/s390/atomic-machine.h b/sysdeps/s390/atomic-machine.h index 34409ca3c6..880e0e3c86 100644 --- a/sysdeps/s390/atomic-machine.h +++ b/sysdeps/s390/atomic-machine.h @@ -15,33 +15,6 @@ License along with the GNU C Library; if not, see . */ -#include - -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int16_t atomic16_t; -typedef uint16_t uatomic16_t; -typedef int_fast16_t atomic_fast16_t; -typedef uint_fast16_t uatomic_fast16_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef int64_t atomic64_t; -typedef uint64_t uatomic64_t; -typedef int_fast64_t atomic_fast64_t; -typedef uint_fast64_t uatomic_fast64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - /* Activate all C11 atomic builtins. Note: diff --git a/sysdeps/sparc/atomic-machine.h b/sysdeps/sparc/atomic-machine.h index 062600218c..b92d2820a0 100644 --- a/sysdeps/sparc/atomic-machine.h +++ b/sysdeps/sparc/atomic-machine.h @@ -19,33 +19,6 @@ #ifndef _ATOMIC_MACHINE_H #define _ATOMIC_MACHINE_H 1 -#include - -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int16_t atomic16_t; -typedef uint16_t uatomic16_t; -typedef int_fast16_t atomic_fast16_t; -typedef uint_fast16_t uatomic_fast16_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef int64_t atomic64_t; -typedef uint64_t uatomic64_t; -typedef int_fast64_t atomic_fast64_t; -typedef uint_fast64_t uatomic_fast64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #ifdef __arch64__ # define __HAVE_64B_ATOMICS 1 #else diff --git a/sysdeps/unix/sysv/linux/hppa/atomic-machine.h b/sysdeps/unix/sysv/linux/hppa/atomic-machine.h index e9edc0e7bc..640f6756f8 100644 --- a/sysdeps/unix/sysv/linux/hppa/atomic-machine.h +++ b/sysdeps/unix/sysv/linux/hppa/atomic-machine.h @@ -15,26 +15,9 @@ License along with the GNU C Library. If not, see . */ -#include /* Required for type definitions e.g. uint8_t. */ - #ifndef _ATOMIC_MACHINE_H #define _ATOMIC_MACHINE_H 1 -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define atomic_full_barrier() __sync_synchronize () #define __HAVE_64B_ATOMICS 0 diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/atomic-machine.h b/sysdeps/unix/sysv/linux/m68k/coldfire/atomic-machine.h index 1228660058..929bdf8edd 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/atomic-machine.h +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/atomic-machine.h @@ -18,22 +18,11 @@ #ifndef _ATOMIC_MACHINE_H #define _ATOMIC_MACHINE_H 1 -#include #include /* Coldfire has no atomic compare-and-exchange operation, but the kernel provides userspace atomicity operations. Use them. */ -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define __HAVE_64B_ATOMICS 0 #define USE_ATOMIC_COMPILER_BUILTINS 0 diff --git a/sysdeps/unix/sysv/linux/nios2/atomic-machine.h b/sysdeps/unix/sysv/linux/nios2/atomic-machine.h index 9bba636c68..8ea7cdbc9b 100644 --- a/sysdeps/unix/sysv/linux/nios2/atomic-machine.h +++ b/sysdeps/unix/sysv/linux/nios2/atomic-machine.h @@ -19,18 +19,6 @@ #ifndef _NIOS2_ATOMIC_MACHINE_H #define _NIOS2_ATOMIC_MACHINE_H 1 -#include - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define __HAVE_64B_ATOMICS 0 #define USE_ATOMIC_COMPILER_BUILTINS 0 diff --git a/sysdeps/unix/sysv/linux/riscv/atomic-machine.h b/sysdeps/unix/sysv/linux/riscv/atomic-machine.h index f4006baac2..8848804f49 100644 --- a/sysdeps/unix/sysv/linux/riscv/atomic-machine.h +++ b/sysdeps/unix/sysv/linux/riscv/atomic-machine.h @@ -19,19 +19,6 @@ #ifndef _LINUX_RISCV_BITS_ATOMIC_H #define _LINUX_RISCV_BITS_ATOMIC_H 1 -#include - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; - -typedef int64_t atomic64_t; -typedef uint64_t uatomic64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define atomic_full_barrier() __sync_synchronize () #ifdef __riscv_atomic diff --git a/sysdeps/unix/sysv/linux/sh/atomic-machine.h b/sysdeps/unix/sysv/linux/sh/atomic-machine.h index ec82e82c80..28d69907e9 100644 --- a/sysdeps/unix/sysv/linux/sh/atomic-machine.h +++ b/sysdeps/unix/sysv/linux/sh/atomic-machine.h @@ -16,34 +16,6 @@ License along with the GNU C Library; if not, see . */ -#include - - -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int16_t atomic16_t; -typedef uint16_t uatomic16_t; -typedef int_fast16_t atomic_fast16_t; -typedef uint_fast16_t uatomic_fast16_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef int64_t atomic64_t; -typedef uint64_t uatomic64_t; -typedef int_fast64_t atomic_fast64_t; -typedef uint_fast64_t uatomic_fast64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - #define __HAVE_64B_ATOMICS 0 #define USE_ATOMIC_COMPILER_BUILTINS 0 diff --git a/sysdeps/x86/atomic-machine.h b/sysdeps/x86/atomic-machine.h index 2692d94a92..af6e1d1c4f 100644 --- a/sysdeps/x86/atomic-machine.h +++ b/sysdeps/x86/atomic-machine.h @@ -23,32 +23,6 @@ #include /* For tcbhead_t. */ #include /* For cast_to_integer. */ -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int16_t atomic16_t; -typedef uint16_t uatomic16_t; -typedef int_fast16_t atomic_fast16_t; -typedef uint_fast16_t uatomic_fast16_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef int64_t atomic64_t; -typedef uint64_t uatomic64_t; -typedef int_fast64_t atomic_fast64_t; -typedef uint_fast64_t uatomic_fast64_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - - #define LOCK_PREFIX "lock;" #define USE_ATOMIC_COMPILER_BUILTINS 1 @@ -119,9 +93,9 @@ typedef uintmax_t uatomic_max_t; "lock\n" \ "0:\tcmpxchgq %q2, %1" \ : "=a" (ret), "=m" (*mem) \ - : "q" ((atomic64_t) cast_to_integer (newval)), \ + : "q" ((int64_t) cast_to_integer (newval)), \ "m" (*mem), \ - "0" ((atomic64_t) cast_to_integer (oldval)), \ + "0" ((int64_t) cast_to_integer (oldval)), \ "i" (offsetof (tcbhead_t, multiple_threads))); \ ret; }) # define do_exchange_and_add_val_64_acq(pfx, mem, value) 0 @@ -191,7 +165,7 @@ typedef uintmax_t uatomic_max_t; else if (__HAVE_64B_ATOMICS) \ __asm __volatile ("xchgq %q0, %1" \ : "=r" (result), "=m" (*mem) \ - : "0" ((atomic64_t) cast_to_integer (newvalue)), \ + : "0" ((int64_t) cast_to_integer (newvalue)), \ "m" (*mem)); \ else \ { \ @@ -222,7 +196,7 @@ typedef uintmax_t uatomic_max_t; else if (__HAVE_64B_ATOMICS) \ __asm __volatile (lock "xaddq %q0, %1" \ : "=r" (__result), "=m" (*mem) \ - : "0" ((atomic64_t) cast_to_integer (__addval)), \ + : "0" ((int64_t) cast_to_integer (__addval)), \ "m" (*mem), \ "i" (offsetof (tcbhead_t, multiple_threads))); \ else \ @@ -264,7 +238,7 @@ typedef uintmax_t uatomic_max_t; else if (__HAVE_64B_ATOMICS) \ __asm __volatile (lock "addq %q1, %0" \ : "=m" (*mem) \ - : "ir" ((atomic64_t) cast_to_integer (value)), \ + : "ir" ((int64_t) cast_to_integer (value)), \ "m" (*mem), \ "i" (offsetof (tcbhead_t, multiple_threads))); \ else \ @@ -298,7 +272,7 @@ typedef uintmax_t uatomic_max_t; else if (__HAVE_64B_ATOMICS) \ __asm __volatile (LOCK_PREFIX "addq %q2, %0; sets %1" \ : "=m" (*mem), "=qm" (__result) \ - : "ir" ((atomic64_t) cast_to_integer (value)), \ + : "ir" ((int64_t) cast_to_integer (value)), \ "m" (*mem)); \ else \ __atomic_link_error (); \ @@ -322,7 +296,7 @@ typedef uintmax_t uatomic_max_t; else if (__HAVE_64B_ATOMICS) \ __asm __volatile (LOCK_PREFIX "addq %q2, %0; setz %1" \ : "=m" (*mem), "=qm" (__result) \ - : "ir" ((atomic64_t) cast_to_integer (value)), \ + : "ir" ((int64_t) cast_to_integer (value)), \ "m" (*mem)); \ else \ __atomic_link_error (); \