From patchwork Fri Oct 3 19:47:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 121232 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 A0A033858427 for ; Fri, 3 Oct 2025 19:55:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0A033858427 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=MRmBK7sn; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=MRmBK7sn X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from AM0PR02CU008.outbound.protection.outlook.com (mail-westeuropeazon11013062.outbound.protection.outlook.com [52.101.72.62]) by sourceware.org (Postfix) with ESMTPS id 44B4D3857836 for ; Fri, 3 Oct 2025 19:49:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 44B4D3857836 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-Filter: OpenARC Filter v1.0.0 sourceware.org 44B4D3857836 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=52.101.72.62 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1759520941; cv=pass; b=YFSfMqY7wC/p0QYnWS2ZwV3Zp/F0sJENiRI2kH7SrZvGB89TVT4eVFT46lRyMlmjWHnhoKy2Lhpl+60+QHAwRKh1oKz8+ezs3/cLFMosv6Y5gsk7LSdwQkFmhm11/s81mcCVDDBw67WsoJpR8OdHEn+ll2MHLfsMefVR2kza4P4= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1759520941; c=relaxed/simple; bh=Gq0YItB3JYz6jIkw1TwEOFRHhAdG5Hbto3qyqWv709Q=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=sQ2LeEdVDYOESJQRTKZQF0pHF+g/zx7M0JIhFqq1bCdT554ncWEYJna2mBWHjSH17x58JRwiMkC0LjMGXG6W40YHncByop/JqsckYNqTlOM/cBpd4w0kpSd87hZ49jbl51EoJ4+kysgHZUEUZO9hSupg2XZujFHrIeKInqby3Cw= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=hv7f3nhJjjCoVGUOiuv43ZnG0MQnUWBfFxLG6wBQHQ+zqqBo2EXW2eX39J1f4z6UO+j0IK6EzQPgE+XCbjND270aHuD0Qi2VisgeJ+f8U2mewP88EXh/MLUgwFjdF657INGTVLjjasFVNat4ppMtI9mggtJOsDI+9Q/3Jx+25McrenRK29sL9k9s+pWcgHHDqoHJlUZo+oV0+2S8g+oh3U5z5uB6CMapuWzH5d1blGqunyxDlEfqURKE3WeHEOrFcr2Vngoz9p39M1MaJsfyhGc92VWH/0utn0V0G8PtAePsmXgvqyG2SipRBBoGkgmpV2u8nfWx/XWq1WZV3wpCXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=dmfB97BEX4aFGUtf+F6vMTk3RH9QfWPpSsZss/t5nkc=; b=N2shvx3Dl5GUOWwRQucjvsNdUtGsl7p8mNMbJMXhHIVc/SuAK3to7vkLoNrrZJ4y7KHvzHlVUwKMp0KuOi830+supBl7o4LOleXgSyA+XgNgK4usYd1afIqHbuO2RdXcbzWnX6+FELeVWQNXF3zvzUo2agN+mzfWvhekgxfPLHSxohGBTydDdAwCQZ5sLkkHrMnftdPglGI2wHDSV4sA6cUINBqGE1PPNfltJj3scxetvsrJeTiDMBiEs1WgHgqhF24DJKyAMIAu9E1bDRilWzmqyxV0dQO8sHIBVuepYHOC9T6jzjPbAefMoD3K60JPFtBIPICGZWIsL1IK1s62Jg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) 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=arm.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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dmfB97BEX4aFGUtf+F6vMTk3RH9QfWPpSsZss/t5nkc=; b=MRmBK7snlXGGPRFq7JODfvTB6+vpHQIxFR5nYc3IvUtu5pZFT9n4pf/4HaFpSJZfc7q/E3inkM3MHDqnNAHlV4wPFX/+DMDC+xgHhnBXVYNwVw/w3TYp2CA2tKIeoH1P3GDhCOFGU6mbFEpoKabM5U+CVKD4gFnkC/vFM1uYbt4= Received: from DUZPR01CA0064.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c2::17) by AS8PR08MB6216.eurprd08.prod.outlook.com (2603:10a6:20b:29c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9182.16; Fri, 3 Oct 2025 19:48:21 +0000 Received: from DB1PEPF000509ED.eurprd03.prod.outlook.com (2603:10a6:10:3c2:cafe::71) by DUZPR01CA0064.outlook.office365.com (2603:10a6:10:3c2::17) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9182.18 via Frontend Transport; Fri, 3 Oct 2025 19:48:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by DB1PEPF000509ED.mail.protection.outlook.com (10.167.242.71) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9160.9 via Frontend Transport; Fri, 3 Oct 2025 19:48:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UVEy5wq2m+tEVEA41RjhG7iKHRrfZmaYFOI64kXOhyF/d8lIr74La3lW8Ittp5gadRP+xC0VK+72+WWjizhRLO5dmWOpPpomPP2RY3uJQP73tYN+CXIKgpEnnTJO/XDccP2LpTcOxdBFYHFIn8Z33OAhxPjTLrSX5dmhPJbZEze5c0yG/CkJ7S9DBKc8Pbh2q8pKD0JnbPN0g7CcA44tyAqHVD0ktax8LDe938MFlBgcYhIdsxU721Fn3BPjAhD21ovlYPbQT9ZnmhMw2Yj9pvC5w62nZc4Csc3XC2zOBNv0ZzfBqeEvb98RoNFaeK0D4sxx7Q7hSVPrtTrmTMIXGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=dmfB97BEX4aFGUtf+F6vMTk3RH9QfWPpSsZss/t5nkc=; b=E+D3hUHcVx+8lb54JUX7nvChiRbb1r0xAjtP0QJrcAe7mrTyCvUx599eC49Dlup+pptQlp+D688t2la5pNs3jWue3gUGOBj2+n+bcjOz5xaXpRtl5/rukeRJ/mNhtDo6x//X1eilpV4u6NtN7Ll+ghql3NwYRz9wcmy7w+yREQAUIsRjyeaywiNjqNulnRThfXQYbsojc1t//iwsxBl2p43k4HPx8T5JKgVrfZTa04Pe+PAc54h609rBQUBrd8T0/C+97gwXJ8+O0gPXdsPhgYBR1z1XqAX4eijkUSgSygAfa+4KfNOty2h9UvVoqpB2l1GBTDWSZN8OuaeqY+HAZA== 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=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dmfB97BEX4aFGUtf+F6vMTk3RH9QfWPpSsZss/t5nkc=; b=MRmBK7snlXGGPRFq7JODfvTB6+vpHQIxFR5nYc3IvUtu5pZFT9n4pf/4HaFpSJZfc7q/E3inkM3MHDqnNAHlV4wPFX/+DMDC+xgHhnBXVYNwVw/w3TYp2CA2tKIeoH1P3GDhCOFGU6mbFEpoKabM5U+CVKD4gFnkC/vFM1uYbt4= Received: from PAWPR08MB8982.eurprd08.prod.outlook.com (2603:10a6:102:33f::20) by AM8PR08MB6564.eurprd08.prod.outlook.com (2603:10a6:20b:314::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9160.17; Fri, 3 Oct 2025 19:47:49 +0000 Received: from PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::b366:6358:236e:352d]) by PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::b366:6358:236e:352d%6]) with mapi id 15.20.9160.017; Fri, 3 Oct 2025 19:47:49 +0000 From: Wilco Dijkstra To: GNU C Library Subject: [PATCH v2] atomic: Use standard atomic fences for barriers Thread-Topic: [PATCH v2] atomic: Use standard atomic fences for barriers Thread-Index: AQHcNJ4k1zOuVxGRC0KEJKjyD1SHDQ== Date: Fri, 3 Oct 2025 19:47:49 +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: PAWPR08MB8982:EE_|AM8PR08MB6564:EE_|DB1PEPF000509ED:EE_|AS8PR08MB6216:EE_ X-MS-Office365-Filtering-Correlation-Id: f5053223-7aad-496a-4e02-08de02b5ceab x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|366016|1800799024|376014|38070700021; X-Microsoft-Antispam-Message-Info-Original: =?iso-8859-1?q?L7elh5lDEBjididXN?= =?iso-8859-1?q?C4/TxhMhGzkeV8gduBPLHhpq+5SNI9DkxOvs5Y0PvKUp2SlTqqzaXxkzEvEj?= =?iso-8859-1?q?6FTOH4+qZaCR3Rxt4hQ6feqYWig8whquTIeliM0x29U90WJ54vDezxm/WEUa?= =?iso-8859-1?q?hIZqw/1pdrj6Pgw2qWiVbgYuVG0rUmNxNy+3WKQWzzOmcuI2mDo5BGi25fZm?= =?iso-8859-1?q?LLpsw3L4efPO4Lp3MMn89hdKdG8mGkOdY7hHgWkOtb6uY5nX91N6Wf0Pgz3r?= =?iso-8859-1?q?BUj1vsMBpfuG1ejhrpQVTZSuhViGYFGSN2C2KypFwWPe9+uPtXg5fZTIomim?= =?iso-8859-1?q?p7eoSXUdoUxAhxwNHnlscYFNrZ+yKibQeYn9Y3xUje78zM2M4WW+km8OHiNk?= =?iso-8859-1?q?kRI/ntw2UoYzeVbrjjGdaLp3mMGSVtyDPydSkE1W0TrAIipK6td6n2c42g4l?= =?iso-8859-1?q?wAU+mRlKtZVeD0Ft3VioPYniQdogLWjPAE8XOcB1UuHHb8nUwOoo5Tc1ywBn?= =?iso-8859-1?q?rguFgtnjE9s4FDfdFBFql6aNq/OpCM+93VBaNaxJTqbVca+J2HodjxCj9IZF?= =?iso-8859-1?q?fT4c+dF2zzxFdyCEACNAAuY8mvvYWBtQU7YWpoiwQtPl3PXDlvxDTK9rDDKJ?= =?iso-8859-1?q?uIws+kBoAW/0nLHm1X1qaHVsYDbWMnPvqUiYTcA8ynaKQ35hCOzOhUbd/A9H?= =?iso-8859-1?q?nGKt9lWVocnDNdv+acf3MkgiYCb375pmzUqostReH72VQ7hpEcwdjADDHiFE?= =?iso-8859-1?q?gckDKM3rwzNKn6NYv3GKcWyq9OnJnJzr1Zb4s1R47s7lKy7ClQtMdI546sNg?= =?iso-8859-1?q?RnuKbI9jQCZQc+ExBA2AHBYwF/hazKYFNbGnhphgYlesyABczI7vmhzTKAYi?= =?iso-8859-1?q?ZLLRpLqgddTukaJ3lIJh6YEPtxnRu3npFGdHtqCppGYGuNRztEBXR6h0/YTa?= =?iso-8859-1?q?uhvypRWs7ej9Mr0CRgr/pGv/a/Xy4Ex0f11HQfi2r5rSnAsuuC0qZdqiRm2u?= =?iso-8859-1?q?W27sy08ad1FtF2sl3qEpCyT7MRwf3r6Jkquks2qvViBO3Y1SJqnVR41yPJyb?= =?iso-8859-1?q?d7RCLhWbp+4c+rlnegwNqcbxzYQqSrpSvj4Igjbf7s4GPMpZHkkDOWecbm1h?= =?iso-8859-1?q?Mh5Xjo7PI3RbJJLYbgPR/7ZaB/rb9kThIq2CmUZKrNYRSzcWo1HcYWCArl3i?= =?iso-8859-1?q?OS/faIz3aEMqdCph4dYoo1cX2cuiuf31zxmMPVTFUOAjcmE1+BnewdluXIEz?= =?iso-8859-1?q?sY78t5o/Rw+1MPGbN510qx1Bfder33yz2TwhxjGHgFUz7Oc8LWqnrWd7Ejq6?= =?iso-8859-1?q?YB79op56afNCbDZwOPmWaLmx3Aa3slDYfARtfdstFc5UH1247/dQOZ81O+6J?= =?iso-8859-1?q?f8/XmlGcXUAcNMlDnVFf8T0rB38W9bCoH6DJQCfYTtPG7ZRtA2o5qBunCaJh?= =?iso-8859-1?q?zEbMBS5QccwMuhWj0FCFbqyZ4OMkXPesCyt2hTci3RWPq37Q4a0rp3x8hAN9?= =?iso-8859-1?q?rENygpgA7dfxDqT42H9qBLJHG7FfN+nOgeDbITOpnqshsmcsknCHkcqd3ZrQ?= =?iso-8859-1?q?qHzxAYOtmjWRnuvZIRd?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8982.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(38070700021); DIR:OUT; SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB6564 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF000509ED.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b333a8ae-471b-47c5-7645-08de02b5bb9e X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|35042699022|82310400026|36860700013|376014|14060799003; X-Microsoft-Antispam-Message-Info: =?iso-8859-1?q?tgWBzcxcL+Jj3K0073BxDagHVp?= =?iso-8859-1?q?AlPEdY9w1JKR7zVYZkmIT8NpLeuiaerHu3oG53qPjTc3oKBut82ionXuiBRW?= =?iso-8859-1?q?zWeptO49T+V5pIe/VqHCfURsFEBmShDG+LFCMkBtnJ94kuiX8PfklMaOK0j8?= =?iso-8859-1?q?sMkw2bx8dTUVQtOMlwxJaq6ffnQQjAMq/pyR+cUKrcpHjQix4ElWOY4gBPtS?= =?iso-8859-1?q?bzTiDouqI+4EXJh4sDViSwkL2Y7OCnu7QkjARKE6QJ5ohh5vQ+aTKaU7xRwi?= =?iso-8859-1?q?mhL+EIu9qVuVpa2cKJ6ksiKMji78bvT9/0SJWbhkOtuzcHSX14XAUkbtvEFi?= =?iso-8859-1?q?BchORezb8/8ENAV1z9MWEY02P6h59aazB6zB87mkU1+s5YN0PjO299HC4Cci?= =?iso-8859-1?q?gbx4WscMM7yUAZ3GsRQPrbkCf44LFvDo1V3rI1SeJHI+rjLLsfOYDlnrAAOB?= =?iso-8859-1?q?LGVnindhjkUsSJqAYNfdj+3S1E4kpg111NppXlXZK90vHnvWnh0Z63R4j82d?= =?iso-8859-1?q?ghPZZu4m+KrWg39S3D6fitDtTiTEs1Pdzta4nSU8mBZr63xoCZfDdXT+GJx/?= =?iso-8859-1?q?Kkwz3nFy5Sh52egtv9SoFpRR6m92Y1OJCLGM4ZIo9zx6dxCLqAi6rpUJI8M+?= =?iso-8859-1?q?i5xNGogditx5G6qczQYdOH02yaK9wsvfhIh/Ogx0DMI6Fk9a+862Bw98cMen?= =?iso-8859-1?q?Hq+XTXaK9naGmVIgtIgLwv6IsrvKjp9cf/pxfoChYAu73WDY1S1xVH65Soh1?= =?iso-8859-1?q?1f/BajdANOjqsN3jvFIoSnKFLbpTjq50pRoDmmLHq8sNE+crzd4y0Ya8tAeS?= =?iso-8859-1?q?FeeDRo5zjCEkdLso3JPN6RJKfZXyi9dL86CPLBcPo53Y6psRzQtADOsIgvpK?= =?iso-8859-1?q?EwbzyMmy27l9fMiwvXCcBRGEvHwjxnppBkvxJ1cEMrw4KGB0XFryBi+G2T/B?= =?iso-8859-1?q?NniEh/xOsLILuBuVyzsU6IpTRVjKZW/v0VQjjpk1XXBp4xjT44RTvrktfhHE?= =?iso-8859-1?q?ksR6OY45ytgTRZBrDe3me2pTmVs5VqSF1J5kfRT+fYEI3pHYOhpnwrHqw/ns?= =?iso-8859-1?q?Mmre1Xpm0WzYeoyyWZiCG1f/ofqmxT3oyhLEEhFFtbJjvO4sLxL+D+HU4GpA?= =?iso-8859-1?q?fqiUNKSkcnjP5g58vryKj7XzTam6Kee8aTAMeyaYC+SNSRVyVXV60hdhMPw3?= =?iso-8859-1?q?z7KB4X8Z1OAV20S5xs7KFBwdH4yvskBboWbI9fW8DfEVDatQ1etZwA51dOlL?= =?iso-8859-1?q?1eruxwng3/q7+Rq+ehVwMv8oPccLAIlS5tv849WM/it/xJB6bPBudg9ebf0W?= =?iso-8859-1?q?o+znwSH2sAg3T7N0MY2VLwRpoahghCpF/VIjCtfwZXzqc0TZAuku5CEc09+A?= =?iso-8859-1?q?URpH8cvVK4QlbcVfCjc5jnE79C1slINiblyZ/D1sqFcYGML9CYzOtqvqI1m8?= =?iso-8859-1?q?tRy0TnSciUiBlug0wNEBDMWJhIFe1kxik0dfhxYra85U6CnAUQvb+Y0+Lf6Z?= =?iso-8859-1?q?a3JDTQLaKlnysGLQ9zFjIAocOOX+/pwdnTo5obagpzrimjE1c8YpjUTrvBGS?= =?iso-8859-1?q?Mmgjs6Sn4/99GLJ5gjmnX0jEReXz6D7w4Ys6N7ianuJx5aqjf04eI=3D?= X-Forefront-Antispam-Report: CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(35042699022)(82310400026)(36860700013)(376014)(14060799003); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2025 19:48:21.2376 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f5053223-7aad-496a-4e02-08de02b5ceab X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129]; Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF000509ED.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6216 X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_LOTSOFHASH, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_NONE, TXREP 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.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org v2: do full replacement of barriers Replace atomic barriers based on sync primitives with atomic_thread_fence. Many uses appear suspect and in the future fixing these to use load_acquire or store_release would be useful. diff --git a/elf/dl-deps.c b/elf/dl-deps.c index 1504f8d60621c6df4c09fe3d73d891a55162a32e..125e6d691273f212781411ab76012309e86d7d1e 100644 --- a/elf/dl-deps.c +++ b/elf/dl-deps.c @@ -430,7 +430,7 @@ _dl_map_object_deps (struct link_map *map, memcpy (&l_initfini[1], needed, nneeded * sizeof needed[0]); memcpy (&l_initfini[nneeded + 1], l_initfini, nneeded * sizeof needed[0]); - atomic_write_barrier (); + atomic_thread_fence_release (); l->l_initfini = l_initfini; l->l_free_initfini = 1; } @@ -555,12 +555,12 @@ _dl_map_object_deps (struct link_map *map, /* Terminate the list of dependencies. */ l_initfini[nlist] = NULL; - atomic_write_barrier (); + atomic_thread_fence_release (); map->l_initfini = l_initfini; map->l_free_initfini = 1; if (l_reldeps != NULL) { - atomic_write_barrier (); + atomic_thread_fence_release (); void *old_l_reldeps = map->l_reldeps; map->l_reldeps = l_reldeps; _dl_scope_free (old_l_reldeps); diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 2f5cd674f58b816d2f0317fe3aaab4bb8ac163ef..3a9ad47ceae7005f8a1da058afeb961ee831f0ea 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -545,7 +545,7 @@ add_dependency (struct link_map *undef_map, struct link_map *map, int flags) = atomic_forced_read (undef_map->l_reldeps); /* Make sure l_reldeps is read before l_initfini. */ - atomic_read_barrier (); + atomic_thread_fence_acquire (); /* Determine whether UNDEF_MAP already has a reference to MAP. First look in the normal dependencies. */ @@ -710,7 +710,7 @@ marking %s [%lu] as NODELETE due to memory allocation failure\n", l_reldepsact * sizeof (struct link_map *)); newp->list[l_reldepsact] = map; newp->act = l_reldepsact + 1; - atomic_write_barrier (); + atomic_thread_fence_release (); void *old = undef_map->l_reldeps; undef_map->l_reldeps = newp; undef_map->l_reldepsmax = max; @@ -721,7 +721,7 @@ marking %s [%lu] as NODELETE due to memory allocation failure\n", else { undef_map->l_reldeps->list[l_reldepsact] = map; - atomic_write_barrier (); + atomic_thread_fence_release (); undef_map->l_reldeps->act = l_reldepsact + 1; } diff --git a/elf/dl-open.c b/elf/dl-open.c index 5526065352230dbd7f42c86257268f6e6fa5d54e..044f02eeb560478490765517f433dbc93becb7e4 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -201,7 +201,7 @@ add_to_global_update (struct link_map *new) assert (added <= ns->_ns_global_scope_pending_adds); ns->_ns_global_scope_pending_adds -= added; - atomic_write_barrier (); + atomic_thread_fence_release (); ns->_ns_main_searchlist->r_nlist = new_nlist; } @@ -341,7 +341,7 @@ update_scopes (struct link_map *new) might use the new last element and then use the garbage at offset IDX+1. */ imap->l_scope[cnt + 1] = NULL; - atomic_write_barrier (); + atomic_thread_fence_release (); imap->l_scope[cnt] = &new->l_searchlist; from_scope = cnt; diff --git a/include/atomic.h b/include/atomic.h index a9eb4d740bce204e7745d09ef2e08c1ea834a4c6..a97786565645ca2d95ba1cea42f5e502832ab487 100644 --- a/include/atomic.h +++ b/include/atomic.h @@ -102,21 +102,6 @@ #endif -#ifndef atomic_full_barrier -# define atomic_full_barrier() __asm ("" ::: "memory") -#endif - - -#ifndef atomic_read_barrier -# define atomic_read_barrier() atomic_full_barrier () -#endif - - -#ifndef atomic_write_barrier -# define atomic_write_barrier() atomic_full_barrier () -#endif - - #ifndef atomic_forced_read # define atomic_forced_read(x) \ ({ __typeof (x) __x; __asm ("" : "=r" (__x) : "0" (x)); __x; }) @@ -158,12 +143,9 @@ void __atomic_link_error (void); __atomic_link_error (); # endif -# define atomic_thread_fence_acquire() \ - __atomic_thread_fence (__ATOMIC_ACQUIRE) -# define atomic_thread_fence_release() \ - __atomic_thread_fence (__ATOMIC_RELEASE) -# define atomic_thread_fence_seq_cst() \ - __atomic_thread_fence (__ATOMIC_SEQ_CST) +# define atomic_thread_fence_acquire() __atomic_thread_fence (__ATOMIC_ACQUIRE) +# define atomic_thread_fence_release() __atomic_thread_fence (__ATOMIC_RELEASE) +# define atomic_thread_fence_seq_cst() __atomic_thread_fence (__ATOMIC_SEQ_CST) # define atomic_load_relaxed(mem) \ ({ __atomic_check_size_ls((mem)); \ diff --git a/include/list.h b/include/list.h index 4c68de61a9f9f2cacff059675c01485d392e3c43..4812918b3d4de34727b475ad202e0aa6ee76aaa2 100644 --- a/include/list.h +++ b/include/list.h @@ -43,7 +43,7 @@ list_add (list_t *newp, list_t *head) newp->next = head->next; newp->prev = head; head->next->prev = newp; - atomic_write_barrier (); + atomic_thread_fence_release (); head->next = newp; } diff --git a/malloc/arena.c b/malloc/arena.c index 4cd79d7244bf62d2a97af2b09241a7d23e73a82a..6eaf6e0857eb84bd77a3f13a1106c28a060b53be 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -103,7 +103,7 @@ static mstate free_list; malloc_state objects. Read access to the next member is supposed to synchronize with the - atomic_write_barrier and the write to the next member in + atomic_thread_fence_release and the write to the next member in _int_new_arena. This suffers from data races; see the FIXME comments in _int_new_arena and reused_arena. @@ -661,7 +661,7 @@ _int_new_arena (size_t size) /* FIXME: The barrier is an attempt to synchronize with read access in reused_arena, which does not acquire list_lock while traversing the list. */ - atomic_write_barrier (); + atomic_thread_fence_release (); main_arena.next = a; __libc_lock_unlock (list_lock); diff --git a/manual/llio.texi b/manual/llio.texi index 806ff0a27d5e0f05e861a032a9ed8e820931def4..a429bb5d40c0d53d99788891f3009128dc38da2c 100644 --- a/manual/llio.texi +++ b/manual/llio.texi @@ -2771,14 +2771,14 @@ aiocb64}, since the LFS transparently replaces the old interface. @c deallocate_stack @asulock @ascuheap @aculock @acsmem @c lll_lock (state_cache_lock) @asulock @aculock @c stack_list_del ok -@c atomic_write_barrier ok +@c atomic_thread_fence_release ok @c list_del ok -@c atomic_write_barrier ok +@c atomic_thread_fence_release ok @c queue_stack @ascuheap @acsmem @c stack_list_add ok -@c atomic_write_barrier ok +@c atomic_thread_fence_release ok @c list_add ok -@c atomic_write_barrier ok +@c atomic_thread_fence_release ok @c free_stacks @ascuheap @acsmem @c list_for_each_prev_safe ok @c list_entry ok diff --git a/manual/memory.texi b/manual/memory.texi index 6a70168e616734ecc588094d04300fc8fecbec9b..e69f377a070b1bea692a6fcc7d03336d7eb07d64 100644 --- a/manual/memory.texi +++ b/manual/memory.texi @@ -395,7 +395,7 @@ this function is in @file{stdlib.h}. @c mutex_init ok @c mutex_lock (just-created mutex) ok, returns locked @c mutex_lock (list_lock) dup @asulock @aculock -@c atomic_write_barrier ok +@c atomic_thread_fence_release ok @c mutex_unlock (list_lock) @aculock @c atomic_fetch_add ok @c reused_arena @asulock @aculock diff --git a/manual/startup.texi b/manual/startup.texi index 9545fcc5263f21c8e88dcdb1e1e38b4f69143ce2..320f172b5a37fb2bc2d5b37498ff16df9aa5d0e4 100644 --- a/manual/startup.texi +++ b/manual/startup.texi @@ -970,7 +970,7 @@ using @code{atexit} or @code{on_exit}. @c __libc_lock_lock @asulock @aculock @c calloc dup @ascuheap @acsmem @c __libc_lock_unlock @aculock -@c atomic_write_barrier dup ok +@c atomic_thread_fence_release dup ok The @code{atexit} function registers the function @var{function} to be called at normal program termination. The @var{function} is called with no arguments. @@ -984,7 +984,7 @@ the function cannot be registered. @safety{@prelim{}@mtsafe{}@asunsafe{@ascuheap{} @asulock{}}@acunsafe{@aculock{} @acsmem{}}} @c on_exit @ascuheap @asulock @aculock @acsmem @c new_exitfn dup @ascuheap @asulock @aculock @acsmem -@c atomic_write_barrier dup ok +@c atomic_thread_fence_release dup ok This function is a somewhat more powerful variant of @code{atexit}. It accepts two arguments, a function @var{function} and an arbitrary pointer @var{arg}. At normal program termination, the @var{function} is diff --git a/nptl/nptl-stack.c b/nptl/nptl-stack.c index c049c5133c6933748532a6c4c076a7ec8b171ea7..70c3769ebb1a8888598341c1d29fd1af31c50437 100644 --- a/nptl/nptl-stack.c +++ b/nptl/nptl-stack.c @@ -28,11 +28,11 @@ __nptl_stack_list_del (list_t *elem) { GL (dl_in_flight_stack) = (uintptr_t) elem; - atomic_write_barrier (); + atomic_thread_fence_release (); list_del (elem); - atomic_write_barrier (); + atomic_thread_fence_release (); GL (dl_in_flight_stack) = 0; } @@ -43,11 +43,11 @@ __nptl_stack_list_add (list_t *elem, list_t *list) { GL (dl_in_flight_stack) = (uintptr_t) elem | 1; - atomic_write_barrier (); + atomic_thread_fence_release (); list_add (elem, list); - atomic_write_barrier (); + atomic_thread_fence_release (); GL (dl_in_flight_stack) = 0; } diff --git a/nptl/pthread_mutex_setprioceiling.c b/nptl/pthread_mutex_setprioceiling.c index a02d1a2c9bea416d4c9d635dd13abbd3b2a7f2b7..4d79c6ea2c205c1f1d7e026d053c2a27f0130b0c 100644 --- a/nptl/pthread_mutex_setprioceiling.c +++ b/nptl/pthread_mutex_setprioceiling.c @@ -113,7 +113,7 @@ __pthread_mutex_setprioceiling (pthread_mutex_t *mutex, int prioceiling, newlock = (mutex->__data.__lock & ~PTHREAD_MUTEX_PRIO_CEILING_MASK); mutex->__data.__lock = newlock | (prioceiling << PTHREAD_MUTEX_PRIO_CEILING_SHIFT); - atomic_full_barrier (); + atomic_thread_fence_seq_cst (); futex_wake ((unsigned int *)&mutex->__data.__lock, INT_MAX, PTHREAD_MUTEX_PSHARED (mutex)); diff --git a/nptl/sem_post.c b/nptl/sem_post.c index 659e931417e6fc3089511293e954f46395c5297d..44f8bae90afbc1d0a1cba8e5b0b8fa3776d72d17 100644 --- a/nptl/sem_post.c +++ b/nptl/sem_post.c @@ -90,7 +90,7 @@ __old_sem_post (sem_t *sem) /* We must need to synchronize with consumers of this token, so the atomic increment must have release MO semantics. */ - atomic_write_barrier (); + atomic_thread_fence_release (); atomic_fetch_add_release (futex, 1); /* We always have to assume it is a shared semaphore. */ futex_wake (futex, 1, LLL_SHARED); diff --git a/sysdeps/aarch64/nptl/tls.h b/sysdeps/aarch64/nptl/tls.h index ede7c0ddc46fb82fa92d7abac2d5b208eeafb7d4..3d0be119e9b385f983f376a5b6f4f1d8659e0a24 100644 --- a/sysdeps/aarch64/nptl/tls.h +++ b/sysdeps/aarch64/nptl/tls.h @@ -108,7 +108,7 @@ typedef struct do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index 1a323e426c79beebff75d14c92b221d6f1060edd..522e711a624b23358a6c9056e3cc2d4364473aea 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -105,7 +105,7 @@ typedef struct do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/arc/nptl/tls.h b/sysdeps/arc/nptl/tls.h index 6b25e8c4bf97210d23fbf8b2a38d94fc2cc5d22d..b2024cf16751eafb311c79667a7fc5bce3328495 100644 --- a/sysdeps/arc/nptl/tls.h +++ b/sysdeps/arc/nptl/tls.h @@ -112,7 +112,7 @@ typedef struct do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/arm/nptl/tls.h b/sysdeps/arm/nptl/tls.h index 65a5f2d3e8061c2be0732caff5befa246d9169b6..48e5db2177a32444e85802a9d61557f70534832e 100644 --- a/sysdeps/arm/nptl/tls.h +++ b/sysdeps/arm/nptl/tls.h @@ -99,7 +99,7 @@ typedef struct do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/csky/nptl/tls.h b/sysdeps/csky/nptl/tls.h index afce12009bd9b1c40a52bbe7fb1332157c9954a3..a196b2e145f782ca15a63416c1003574fb4baa6b 100644 --- a/sysdeps/csky/nptl/tls.h +++ b/sysdeps/csky/nptl/tls.h @@ -127,7 +127,7 @@ typedef struct do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/generic/malloc-machine.h b/sysdeps/generic/malloc-machine.h index 1bbe03bf5d780e93d2d8d58c83722674a5b5e3b8..9b5e9b2dd108cfa835e8497072b9b13bf779d6b3 100644 --- a/sysdeps/generic/malloc-machine.h +++ b/sysdeps/generic/malloc-machine.h @@ -22,18 +22,6 @@ #include -#ifndef atomic_full_barrier -# define atomic_full_barrier() __asm ("" ::: "memory") -#endif - -#ifndef atomic_read_barrier -# define atomic_read_barrier() atomic_full_barrier () -#endif - -#ifndef atomic_write_barrier -# define atomic_write_barrier() atomic_full_barrier () -#endif - #ifndef DEFAULT_TOP_PAD # define DEFAULT_TOP_PAD 131072 #endif diff --git a/sysdeps/hppa/dl-fptr.c b/sysdeps/hppa/dl-fptr.c index 843511cc697ff750ba98b39b513302197ca681f6..0c46415bbb753ac688532551db0614b051f01de2 100644 --- a/sysdeps/hppa/dl-fptr.c +++ b/sysdeps/hppa/dl-fptr.c @@ -371,7 +371,7 @@ _dl_lookup_address (const void *address) /* First load the relocation offset. */ reloc_arg = (ElfW(Word)) desc[1]; - atomic_full_barrier(); + atomic_thread_fence_seq_cst (); /* Then load first word of candidate descriptor. It should be a pointer with word alignment and point to memory that can be read. */ diff --git a/sysdeps/hppa/dl-machine.h b/sysdeps/hppa/dl-machine.h index dd2cf0a050435f00f27fd5534974d2bb7e866c89..cdffa7bff3a387e9e0b632931581f8afe1be9533 100644 --- a/sysdeps/hppa/dl-machine.h +++ b/sysdeps/hppa/dl-machine.h @@ -136,7 +136,7 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t t, /* Need to ensure that the gp is visible before the code entry point is updated */ rfdesc[1] = value.gp; - atomic_full_barrier(); + atomic_thread_fence_seq_cst (); rfdesc[0] = value.ip; } else diff --git a/sysdeps/hppa/nptl/tls.h b/sysdeps/hppa/nptl/tls.h index b10abbe3993f19898497f5b04b906c07496841fb..ddfa485fca96b31892cbcda429940052818e0037 100644 --- a/sysdeps/hppa/nptl/tls.h +++ b/sysdeps/hppa/nptl/tls.h @@ -119,7 +119,7 @@ typedef struct do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/htl/pt-once.c b/sysdeps/htl/pt-once.c index 1f999ce4926f3b794d1c4ad2e30b0f01735ceb67..b0719852f99c0ad46e3e779324caa8d38e6e865c 100644 --- a/sysdeps/htl/pt-once.c +++ b/sysdeps/htl/pt-once.c @@ -34,7 +34,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) { ASSERT_TYPE_SIZE (pthread_once_t, __SIZEOF_PTHREAD_ONCE_T); - atomic_full_barrier (); + atomic_thread_fence_seq_cst (); if (once_control->__run == 0) { __pthread_spin_wait (&once_control->__lock); @@ -45,7 +45,7 @@ __pthread_once (pthread_once_t *once_control, void (*init_routine) (void)) init_routine (); pthread_cleanup_pop (0); - atomic_full_barrier (); + atomic_thread_fence_seq_cst (); once_control->__run = 1; } diff --git a/sysdeps/loongarch/nptl/tls.h b/sysdeps/loongarch/nptl/tls.h index 61acb6145f238b6e04f7ac2a2b2faaf91308ac17..9d16cea0e9c64c1306f68dd1509b8629e63f0916 100644 --- a/sysdeps/loongarch/nptl/tls.h +++ b/sysdeps/loongarch/nptl/tls.h @@ -129,7 +129,7 @@ typedef struct do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/m68k/nptl/tls.h b/sysdeps/m68k/nptl/tls.h index cdf558232e73050267f6581b3858be0309a78944..b3c8bff1816bd281d7328ee1be94ae15d5da09c9 100644 --- a/sysdeps/m68k/nptl/tls.h +++ b/sysdeps/m68k/nptl/tls.h @@ -132,7 +132,7 @@ extern void * __m68k_read_tp (void); do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/mach/hurd/htl/pt-mutex-destroy.c b/sysdeps/mach/hurd/htl/pt-mutex-destroy.c index c0624ec72f7dc346dc8e7acd00ef3caeec348519..b59faa8786306a816431fba47c36df5c378990d5 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-destroy.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-destroy.c @@ -27,7 +27,7 @@ int __pthread_mutex_destroy (pthread_mutex_t *mtxp) { - atomic_read_barrier (); + atomic_thread_fence_acquire (); if (*(volatile unsigned int *) &mtxp->__lock != 0) return EBUSY; diff --git a/sysdeps/mach/hurd/htl/pt-mutex.h b/sysdeps/mach/hurd/htl/pt-mutex.h index 1e5e00b1d4c19a6d735046245a0c1c9b5ed63df8..24834bd8dfab257a854ac58a8dedac66bb60b428 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex.h +++ b/sysdeps/mach/hurd/htl/pt-mutex.h @@ -54,7 +54,7 @@ if (ret == EOWNERDEAD) \ { \ mtxp->__lock = mtxp->__lock | LLL_DEAD_OWNER; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ } \ } \ diff --git a/sysdeps/microblaze/nptl/tls.h b/sysdeps/microblaze/nptl/tls.h index 368188481704c027b4a7c7cde7af8febeb2f96ed..c20e3772ca82785c47f19c87dd3efe286e4bd969 100644 --- a/sysdeps/microblaze/nptl/tls.h +++ b/sysdeps/microblaze/nptl/tls.h @@ -110,7 +110,7 @@ typedef struct do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/mips/nptl/tls.h b/sysdeps/mips/nptl/tls.h index 77d620e0f1dd820e960d67e6c0be2716ca99e966..018c770b74d423299ead4b2fd98fd1b42d97e034 100644 --- a/sysdeps/mips/nptl/tls.h +++ b/sysdeps/mips/nptl/tls.h @@ -159,7 +159,7 @@ typedef struct do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/or1k/nptl/tls.h b/sysdeps/or1k/nptl/tls.h index f93fcb893bf3f93f051fc9d1a8927fb7b05bbd1b..a60c12a1551a07426c21de7ccb4f681c94e02085 100644 --- a/sysdeps/or1k/nptl/tls.h +++ b/sysdeps/or1k/nptl/tls.h @@ -175,7 +175,7 @@ register tcbhead_t *__thread_self __asm__("r10"); do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/powerpc/nptl/tls.h b/sysdeps/powerpc/nptl/tls.h index 683d5b3960b251c600db8451511fa6bc1d3d3ccd..467068c67165bdca33dfee3d7ddf69984a04165e 100644 --- a/sysdeps/powerpc/nptl/tls.h +++ b/sysdeps/powerpc/nptl/tls.h @@ -237,7 +237,7 @@ extern tcbhead_t __tcb attribute_hidden; do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/riscv/nptl/tls.h b/sysdeps/riscv/nptl/tls.h index 11a1b0897215c8e0dad7588b684870fc69792033..6b44b8cd8bc2e853dd90a95f4d0befdb5dae0aba 100644 --- a/sysdeps/riscv/nptl/tls.h +++ b/sysdeps/riscv/nptl/tls.h @@ -123,7 +123,7 @@ typedef struct do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/s390/nptl/tls.h b/sysdeps/s390/nptl/tls.h index dbdf5f2da40ddd92b220adc9db2a1767e8b7e0ce..d4e96209d7344e873ece6263585ae5e439a83a94 100644 --- a/sysdeps/s390/nptl/tls.h +++ b/sysdeps/s390/nptl/tls.h @@ -167,7 +167,7 @@ typedef struct do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/sh/nptl/tls.h b/sysdeps/sh/nptl/tls.h index 0eef214daa481ea1f56da87b35ca23d689ef4689..5095a134b62b21579205cc86a2217659e37e647f 100644 --- a/sysdeps/sh/nptl/tls.h +++ b/sysdeps/sh/nptl/tls.h @@ -139,7 +139,7 @@ typedef struct do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0) diff --git a/sysdeps/sparc/nptl/tls.h b/sysdeps/sparc/nptl/tls.h index 0fe5167b7d62098394680a97b7cb1c2818725997..16473ec2bb9baecf7ecd961ccce83a43dc340feb 100644 --- a/sysdeps/sparc/nptl/tls.h +++ b/sysdeps/sparc/nptl/tls.h @@ -140,7 +140,7 @@ register struct pthread *__thread_self __asm__("%g7"); do \ { \ THREAD_SELF->header.gscope_flag = THREAD_GSCOPE_FLAG_USED; \ - atomic_write_barrier (); \ + atomic_thread_fence_release (); \ } \ while (0)