From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70040.outbound.protection.outlook.com [40.107.7.40]) by sourceware.org (Postfix) with ESMTPS id AB7B2385829F for ; Thu, 8 Sep 2022 14:02:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AB7B2385829F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=IiJ2H+07OUMHr7Pq7ecWqurXo0lKn3IxRCXNcJJNr4yEzL+ofL8Jym6VU2xANFW8OHFTAJSksv+oAxGKvjCBF3d8DL1Wwbxa/b+n47cmNweCUECyGbFaVCjCNZR6+UYNfOWI9XOOZmDBjDyLwm+0WZT+fTwthbK3EGzz76hfQa7cf3xHcK4t6Gv0GtOV98maf6xQjPJ7piGTs5IDMLKw4Bb98JuoW1xOnJuuRekGdQ1xOd/vUvgO4I1+V9CxpNHNQ1P9p+WbC7phPvxyWMGUNfwt2n5n4CGf44ECyMiptb6vl6Mq8QDTPrLAFVHfnoLNnW0b5fmHCYKsV12EuTJmEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cCpC2QLif8P4OSwI0jecYA/CQyS9hPLGTDHQ5sgttPc=; b=A946/6v6Wf5T49EqMQ/B1bjuBL12hUizrbNOdAr26fQN4mUGygF7xfrWQjp3gtg4oTYOi9WpkYBzg4V3yue+JjwskaFu3TgroWrSSi2Yz9myveckli3+x1BeTKfYFiLI4a4aQ82zImnf4SzfsjusXSY/pBZAix5m56NhLnPQsIqjKPV/C3vd36PQ2D0v3DLhRQOCJxeDOwpAvGRcsyw4I6unPMG3NTHA5BowAxHnNu3F+PFYc4rKEk9lvNFlvzmBZdNs/JwPlQiTqSslrbjg7bGquOkhpC/JmuicaSyxaq9qdrty26umFfvqYOg4ipw0ORYxDejPbSlM83tqe2zd4g== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cCpC2QLif8P4OSwI0jecYA/CQyS9hPLGTDHQ5sgttPc=; b=P3VnN7udSfF3rVTGrs3LyYBshKhd5BYGTh3KHWVcg93qY/C7dRiGuS04rvKUrxeUiC2A8Q1fuQewIsNvGzvQNj1F8mBr7ql3sCQFv0p+K0Rf0waeebEaU2qc/pXWO7BoHnZnanOtmPCx7W8sWAocEz1EXTCZIisVjPBJF6E0Uo4= Received: from DB8P191CA0028.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::38) by AM9PR08MB5876.eurprd08.prod.outlook.com (2603:10a6:20b:2d5::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.11; Thu, 8 Sep 2022 14:02:06 +0000 Received: from DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:130:cafe::2d) by DB8P191CA0028.outlook.office365.com (2603:10a6:10:130::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.15 via Frontend Transport; Thu, 8 Sep 2022 14:02:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT062.mail.protection.outlook.com (100.127.142.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.13 via Frontend Transport; Thu, 8 Sep 2022 14:02:06 +0000 Received: ("Tessian outbound 73dd6a25223d:v123"); Thu, 08 Sep 2022 14:02:06 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4fee8a965230de3f X-CR-MTA-TID: 64aa7808 Received: from fe33a33b0a52.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 43F8CD57-ECCE-4628-B970-4917DF418F01.1; Thu, 08 Sep 2022 14:01:58 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id fe33a33b0a52.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 08 Sep 2022 14:01:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZSW7kycKAUaVsPutgA2I9iWcpca80kVncqODBrxGN1Q61stQMvAemooCTPIaI8j/nbBBLHV7fmKU6Gi52Mqzh4BuN1IWVACDirHqAsDZQUEJ/geP4857C64e7+g0XQJwH0cfHnuwzEYoEQGjoKN3pYHn+JGHvPf+z9m4WC0+g+F/CU+3QA+LO/fy+kA9epnR8WzRrp4WNRu4hpW3DRZKcWkouvljLChEOPJjq2b6A7uosVPvwW/8nWNQON7qcAekAbUR50Qcqwz0CRcyIkUzdpogxqAgSXhQBLR1mey4HnZsbaaE8FxkcNJ88KqZdpTRqtXQl/61YkfjNtcgOOMaLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cCpC2QLif8P4OSwI0jecYA/CQyS9hPLGTDHQ5sgttPc=; b=kLuvGBVDPZ+OPnqz0EmYLkJCxyFSpwVWjvb8TwwjDSolFh4Te4/uhNTkajqZJEx4WG2fs45CrTE8qfxCj7u1lMBTJlk+dcqE8zF40nxtHIB4o1yOj8kMN2ZUZcy7obPc1lqCZZGbYkrmY9GL/0QQg+Gje+ba9yD7Mnm3rUSZbP1xKKo+NZWgFEMnznhT330MfuWiuAR5wRig4we2oM2SMYNseaCswQ7yqfU/Jg+ahalI2NOleZtMn8ShRgDb5fF49C2UhWf+VhmDt7D/QtqZMHDSJhhRGw+eZuTVge7k3f3IxIoZalKcsl1n7FCeVfnkZTOclLJrEehatiHoo1rwXw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cCpC2QLif8P4OSwI0jecYA/CQyS9hPLGTDHQ5sgttPc=; b=P3VnN7udSfF3rVTGrs3LyYBshKhd5BYGTh3KHWVcg93qY/C7dRiGuS04rvKUrxeUiC2A8Q1fuQewIsNvGzvQNj1F8mBr7ql3sCQFv0p+K0Rf0waeebEaU2qc/pXWO7BoHnZnanOtmPCx7W8sWAocEz1EXTCZIisVjPBJF6E0Uo4= Received: from AS4PR08MB7901.eurprd08.prod.outlook.com (2603:10a6:20b:51c::16) by AM8PR08MB5666.eurprd08.prod.outlook.com (2603:10a6:20b:1de::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.12; Thu, 8 Sep 2022 14:01:56 +0000 Received: from AS4PR08MB7901.eurprd08.prod.outlook.com ([fe80::d11d:77d0:c2fb:f11a]) by AS4PR08MB7901.eurprd08.prod.outlook.com ([fe80::d11d:77d0:c2fb:f11a%5]) with mapi id 15.20.5612.014; Thu, 8 Sep 2022 14:01:55 +0000 From: Wilco Dijkstra To: 'GNU C Library' CC: Adhemerval Zanella Subject: [PATCH] Use C11 atomics instead of atomic_increment(_val) Thread-Topic: [PATCH] Use C11 atomics instead of atomic_increment(_val) Thread-Index: AQHYw4r/fYCGfZibmEmsjrPsn5ptgQ== Date: Thu, 8 Sep 2022 14:01:55 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: AS4PR08MB7901:EE_|AM8PR08MB5666:EE_|DBAEUR03FT062:EE_|AM9PR08MB5876:EE_ X-MS-Office365-Filtering-Correlation-Id: e03fb246-e462-4a54-9c6f-08da91a2b6e7 x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: p0dypYFEnYAtRVgiBrYP4aTeWtwJmbUX1CeZLaiqTtizzsIBdLpbkjE9Wmd8+387yAreHfsmPI1G8a7hlaTqzn9S/oaStmrW+v/aDxLL3/SR/8QYlaOt0tBwnKRMWW/NZVhYxOtMWQcjj5KY9mUF/kDJQm5cAaQH1x9N3JzNIbCSFKSVeHev2uIBSmlRYFRsb06tNT2zn3VPabOIb6cX2dflal2nncSEmwor+Dwwql8Gay2zzE2XZ9PubSQZG8KylGPt2vqG0Li78llemJbUQEVbKnr/4FBSZ1Th3Ma7pFXQWTXOSdYLnPA/TZs5EqJYB8Wv8MF2wunALZbNE5vlvaBYFZJ4pNx6FWRftqCmB/6Q6q9GCY3JIEV+s4iXdzyMGLcJgRGj/ZfS2qmQZN7YP0nb6cSklkxMSB2JpMzFUrBsrtSvMFYRSHsYsj8UVb0JvseAlOfIUZFtR5jG9K0u6JuRg3DsiWhhZ9AmhHcKHtMTS/4mGuBGbqbVnIHSniEj6Hsox2nJPoL1ZnaAhQXSi3ORg0geKd4MJIBosTXzJNosz+azg2htIacsSxmnbu7Umeeb0+4w0xelLezH3F9/xXuzYyOAE1UsAHcB/h6A49sjCTesb1F1gRHfW42ay+vJnTGXSoLEFPPRTplPJumSloWyoyVXIoOVamt5AwMth12K34bNnkUDt2fD1JUGKX+xBwiYqkIHu/yld/maCZr3J147ZabAfePTs/Kco+1U5AI5/VrMAI4Hg4RrjrbfwHCBZkTLV9e8Vj4TNz9opK3lOg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR08MB7901.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(136003)(39860400002)(376002)(346002)(366004)(396003)(186003)(8936002)(52536014)(55016003)(2906002)(6506007)(41300700001)(7696005)(478600001)(33656002)(9686003)(86362001)(71200400001)(5660300002)(83380400001)(38070700005)(38100700002)(26005)(122000001)(76116006)(66476007)(8676002)(66556008)(66446008)(66946007)(316002)(6916009)(64756008)(91956017)(4326008);DIR:OUT;SFP:1101; Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5666 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b27c2f29-50a0-48cf-1322-08da91a2b011 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ICtQadNhwPdfVy4KmptPOMqzlnPWAuu6BOsG4cz2Eo+wbHN7su9jYQFUQUkqtAEMwfZp+QKZ7eGS4K8PpxN6AWxPhZLJrzpWTJO+W807Jlg4aucvzCzwH+nNbgV7FBaVC4DLPevg1ZckPWn/H4ivky5FPMWgOEGc6FjB9aPsOmkYpGLJCBkYWczY1ewmEguclAiJ35mKjxwNsviDFebX7CFki9LoraYattRv58Nsf6lVvSnmoe0o76Yre6mlGmxRrIQT66cu3PvR+fguHyVrgogfCQmgzhrUiOBw4CHQyWDcaqfOnVM6uTJT9wvyahvajOhZhoNHo9qC3dtTbvvmDi/LArmrJq8n6RFKtHACzHxz2z/XYRvtLW7G11EIMFREkl4LoEZ7uu0ZQRrPWeQLJG+5bq2b/+JB+sGkBvQ7OWixYalqWQsRvoQk+eIvvV7ccHs7tzLjoRj4RRdfgG2SfaPSyf7sETZzmNLv2wBPEfFs6iCsKyu3dVHkbI943m2D36yvuJqIICoLsfqP2NsHUXs//VuI3tvfcBGYRgQ7rFr98uReC6YDZJVNYr558kyLZK5AHpR+PFyA9tQdvAzE/40z3zvb5bB6KJM7ruQgVdqN3X0dANSDZl8CYSOFdAOpTDJ+K8d1hoLBMPFb235RL1OfV2DDfpZ0YNVbC9LG04oJMi1ly1sNm97JhVc5UFb3KpBHgW8pkAIVB1WIJO9WeHvyepEMeisHe5pLcM/mvHGeIt3GTSkpRXLLKiqYxCGYIK7anN0O0ma9SyW9FS8DpA== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230016)(4636009)(346002)(376002)(396003)(136003)(39860400002)(40470700004)(46966006)(36840700001)(41300700001)(83380400001)(52536014)(186003)(8936002)(9686003)(2906002)(5660300002)(40480700001)(55016003)(47076005)(26005)(86362001)(336012)(7696005)(478600001)(107886003)(33656002)(6506007)(356005)(81166007)(70586007)(70206006)(4326008)(8676002)(316002)(82310400005)(6916009)(36860700001)(82740400003)(40460700003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 14:02:06.5551 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e03fb246-e462-4a54-9c6f-08da91a2b6e7 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT062.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB5876 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,KAM_LOTSOFHASH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Replace atomic_increment and atomic_increment_val with atomic_fetch_add_rel= axed.=0A= One case in sem_post.c uses release semantics (see comment above it).=0A= =0A= Passes regress on AArch64.=0A= =0A= ---=0A= =0A= diff --git a/htl/pt-create.c b/htl/pt-create.c=0A= index ce52ed9f52210a4e4c7a049ebee817ec9ccfeeb1..14f02cd2b8a19e8581a170dfba2= b948ef8304203 100644=0A= --- a/htl/pt-create.c=0A= +++ b/htl/pt-create.c=0A= @@ -228,7 +228,7 @@ __pthread_create_internal (struct __pthread **thread,= =0A= the number of threads from within the new thread isn't an option=0A= since this thread might return and call `pthread_exit' before the=0A= new thread runs. */=0A= - atomic_increment (&__pthread_total);=0A= + atomic_fetch_add_relaxed (&__pthread_total, 1);=0A= =0A= /* Store a pointer to this thread in the thread ID lookup table. We=0A= could use __thread_setid, however, we only lock for reading as no=0A= diff --git a/manual/ipc.texi b/manual/ipc.texi=0A= index 081b98fe29e0b3b5b7f4f916ad2085d170bd3825..f7cbdc3e09b0b4aea9a96ddcaf5= 71c474024cc32 100644=0A= --- a/manual/ipc.texi=0A= +++ b/manual/ipc.texi=0A= @@ -85,7 +85,7 @@ by @theglibc{}.=0A= =0A= @deftypefun int sem_wait (sem_t *@var{sem});=0A= @safety{@prelim{}@mtsafe{}@assafe{}@acunsafe{@acucorrupt{}}}=0A= -@c atomic_increment (nwaiters) acucorrupt=0A= +@c atomic_fetch_add_relaxed (nwaiters) acucorrupt=0A= @c=0A= @c Given the use atomic operations this function seems=0A= @c to be AS-safe. It is AC-unsafe because there is still=0A= diff --git a/manual/llio.texi b/manual/llio.texi=0A= index 92bfd93e067ce2a782369084ed7dae099300f418..4e6e3fb672bb8ecbb1bb52faf3d= 70d9b7b33973f 100644=0A= --- a/manual/llio.texi=0A= +++ b/manual/llio.texi=0A= @@ -2528,7 +2528,7 @@ aiocb64}, since the LFS transparently replaces the ol= d interface.=0A= @c _dl_allocate_tls_init ok=0A= @c GET_DTV ok=0A= @c mmap ok=0A= -@c atomic_increment_val ok=0A= +@c atomic_fetch_add_relaxed ok=0A= @c munmap ok=0A= @c change_stack_perm ok=0A= @c mprotect ok=0A= @@ -2567,7 +2567,7 @@ aiocb64}, since the LFS transparently replaces the ol= d interface.=0A= @c do_clone @asulock @ascuheap @aculock @acsmem=0A= @c PREPARE_CREATE ok=0A= @c lll_lock (pd->lock) @asulock @aculock=0A= -@c atomic_increment ok=0A= +@c atomic_fetch_add_relaxed ok=0A= @c clone ok=0A= @c atomic_decrement ok=0A= @c atomic_exchange_acquire ok=0A= diff --git a/nptl/nptl_setxid.c b/nptl/nptl_setxid.c=0A= index aa863c7ea8122ea01d1aa4cffe101bbb7c11270c..3b7e2d434abe8a15145349d1a08= a4e706061c74d 100644=0A= --- a/nptl/nptl_setxid.c=0A= +++ b/nptl/nptl_setxid.c=0A= @@ -163,7 +163,7 @@ setxid_signal_thread (struct xid_command *cmdp, struct = pthread *t)=0A= /* If this failed, it must have had not started yet or else exited. */= =0A= if (!INTERNAL_SYSCALL_ERROR_P (val))=0A= {=0A= - atomic_increment (&cmdp->cntr);=0A= + atomic_fetch_add_relaxed (&cmdp->cntr, 1);=0A= return 1;=0A= }=0A= else=0A= diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c=0A= index 8533d609684bc6681fbdccd9f2635d03ef3aa937..2602dba54e872f36bd54955af75= 87378e5dc3812 100644=0A= --- a/nptl/pthread_create.c=0A= +++ b/nptl/pthread_create.c=0A= @@ -759,7 +759,7 @@ __pthread_create_2_1 (pthread_t *newthread, const pthre= ad_attr_t *attr,=0A= we momentarily store a false value; this doesn't matter because there= =0A= is no kosher thing a signal handler interrupting us right here can do= =0A= that cares whether the thread count is correct. */=0A= - atomic_increment (&__nptl_nthreads);=0A= + atomic_fetch_add_relaxed (&__nptl_nthreads, 1);=0A= =0A= /* Our local value of stopped_start and thread_ran can be accessed at=0A= any time. The PD->stopped_start may only be accessed if we have=0A= diff --git a/nptl/sem_post.c b/nptl/sem_post.c=0A= index 9e5741753a741034db96cfff8b8978908fafc1f6..7ec21e92eb4c71d7f17764e96bc= 7603837f7522d 100644=0A= --- a/nptl/sem_post.c=0A= +++ b/nptl/sem_post.c=0A= @@ -91,7 +91,7 @@ __old_sem_post (sem_t *sem)=0A= /* We must need to synchronize with consumers of this token, so the atom= ic=0A= increment must have release MO semantics. */=0A= atomic_write_barrier ();=0A= - (void) atomic_increment_val (futex);=0A= + atomic_fetch_add_release (futex, 1);=0A= /* We always have to assume it is a shared semaphore. */=0A= futex_wake (futex, 1, LLL_SHARED);=0A= return 0;=0A= diff --git a/nscd/cache.c b/nscd/cache.c=0A= index b66c35334a79a315ac9fd533df09ec097221d8e0..21af9a0f9550dfc7c1121fb5014= cd80acdfcf696 100644=0A= --- a/nscd/cache.c=0A= +++ b/nscd/cache.c=0A= @@ -192,7 +192,7 @@ cache_add (int type, const void *key, size_t len, struc= t datahead *packet,=0A= =0A= /* We depend on this value being correct and at least as high as the=0A= real number of entries. */=0A= - atomic_increment (&table->head->nentries);=0A= + atomic_fetch_add_relaxed (&table->head->nentries, 1);=0A= =0A= /* It does not matter that we are not loading the just increment=0A= value, this is just for statistics. */=0A= diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c=0A= index 8e66fa2548e87c9b24cade41339c83f4cef7f2cf..d3e05e272a854e13c0e4d18594e= a57336b8db2bf 100644=0A= --- a/nscd/nscd_helper.c=0A= +++ b/nscd/nscd_helper.c=0A= @@ -425,7 +425,7 @@ __nscd_get_map_ref (request_type type, const char *name= ,=0A= 0))=0A= cur =3D NO_MAPPING;=0A= else=0A= - atomic_increment (&cur->counter);=0A= + atomic_fetch_add_relaxed (&cur->counter, 1);=0A= }=0A= }=0A= =0A= diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/c= heck_pf.c=0A= index 4d486ca9b5026c7a7950bd7c7155212966df3c44..0b77a2d897027edc36e956301f0= 18c2ab0121444 100644=0A= --- a/sysdeps/unix/sysv/linux/check_pf.c=0A= +++ b/sysdeps/unix/sysv/linux/check_pf.c=0A= @@ -72,8 +72,8 @@ static uint32_t nl_timestamp;=0A= uint32_t=0A= __bump_nl_timestamp (void)=0A= {=0A= - if (atomic_increment_val (&nl_timestamp) =3D=3D 0)=0A= - atomic_increment (&nl_timestamp);=0A= + if (atomic_fetch_add_relaxed (&nl_timestamp, 1) + 1 =3D=3D 0)=0A= + atomic_fetch_add_relaxed (&nl_timestamp, 1);=0A= =0A= return nl_timestamp;=0A= }=0A= @@ -309,7 +309,7 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,=0A= if (cache_valid_p ())=0A= {=0A= data =3D cache;=0A= - atomic_increment (&cache->usecnt);=0A= + atomic_fetch_add_relaxed (&cache->usecnt, 1);=0A= }=0A= else=0A= {=0A= =0A=