From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10557 invoked from network); 18 May 2023 14:01:39 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 18 May 2023 14:01:39 -0000 Received: (qmail 11817 invoked by uid 550); 18 May 2023 14:01:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 11782 invoked from network); 18 May 2023 14:01:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:message-id:in-reply-to: references:mime-version; bh=hhHznJBbjDO28BPQTX92Z3lmpjuAMhcGY5AFaS7umtE=; b=DI7sewmayV/81JHwfJoG6pJnttLFg1hxPR8unu/BBol/pSEqBaKXKhts +8GxvMxI4IbhDtQwPnXYVpCqYa3bhQLuBjkwbqxq+A00hYASemf3ZT1so wiQ7FudrRDVRVW7Knu1dWGjKhETQv3f9pDKRNDaWA/psAIFSudt4ZBwoL k=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=jens.gustedt@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.99,285,1677538800"; d="scan'208";a="108635582" Date: Thu, 18 May 2023 16:01:18 +0200 From: =?UTF-8?B?SuKCkeKCmeKCmw==?= Gustedt To: Rich Felker Cc: musl@lists.openwall.com, 847567161 <847567161@qq.com> Message-ID: <20230518160118.231a1585@inria.fr> In-Reply-To: <20230518132905.GP4163@brightrain.aerifal.cx> References: <20230518122306.GU3630668@port70.net> <20230518132905.GP4163@brightrain.aerifal.cx> Organization: inria.fr X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) X-Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAACRQTFRFERslNjAsLTE9Ok9wUk9TaUs8iWhSrYZkj42Rz6aD3sGZ MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/KkiIkP7gP4Nhg3_j16md8i."; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: Re: [musl] =?UTF-8?B?UXVlc3Rpb27vvJpXaHk=?= musl call a_barrier in __pthread_once? --Sig_/KkiIkP7gP4Nhg3_j16md8i. Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Rich, on Thu, 18 May 2023 09:29:05 -0400 you (Rich Felker ) wrote: > Of course call_once is exempt from any such requirements it was, but isn't anymore. In C23, now we have Completion of an effective call to the `call_once` function synchronizes with all subsequent calls to the `call_once` function with the same value of `flag`. POSIX (for which the ISO 9945 instantiation is currently at NB ballot) also has updated all of this The pthread_once() and call_once() functions shall synchronize memory for the first successful call in each thread for a given pthread_once_t or once_flag object, respectively. If the init_routine called by pthread_once() or call_once() is a cancellation point and is canceled, a successful call to pthread_once() for the same pthread_once_t object or to call_once() for the same once_flag object, made from a cancellation cleanup handler shall also synchronize memory. If I understand this correctly, the C11 interfaces become mandatory if the platform supports threads. Thanks J=E2=82=91=E2=82=99=E2=82=9B --=20 :: ICube :::::::::::::::::::::::::::::: deputy director :: :: Universit=C3=A9 de Strasbourg :::::::::::::::::::::: ICPS :: :: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus :: :: :::::::::::::::::::::::::::::::::::: =E2=98=8E +33 368854536 :: :: https://icube-icps.unistra.fr/index.php/Jens_Gustedt :: --Sig_/KkiIkP7gP4Nhg3_j16md8i. Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSN9stI2OFN1pLljN0P0+hp2tU34gUCZGYvrwAKCRAP0+hp2tU3 4iANAJ90s3TnJ0+0C2PYd5oa7M9i2SUB4ACfdq3crf6KRamCxyD+LQPxsLrKnFE= =FNYK -----END PGP SIGNATURE----- --Sig_/KkiIkP7gP4Nhg3_j16md8i.--