From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9119 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: atomic.h cleanup Date: Thu, 14 Jan 2016 18:32:24 -0500 Message-ID: <20160114233223.GA238@brightrain.aerifal.cx> References: <20160110122139.GF2016@debian> <20160110165718.GR238@brightrain.aerifal.cx> <20160110173509.GG2016@debian> <20160111163544.GI2016@debian> <1452532349.28095.10.camel@inria.fr> <20160111190356.GA13558@port70.net> <1452545810.28095.12.camel@inria.fr> <20160114221257.GS238@brightrain.aerifal.cx> <1452811068.5797.9.camel@inria.fr> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1452814359 19991 80.91.229.3 (14 Jan 2016 23:32:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Jan 2016 23:32:39 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9132-gllmg-musl=m.gmane.org@lists.openwall.com Fri Jan 15 00:32:39 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aJrNe-000050-7H for gllmg-musl@m.gmane.org; Fri, 15 Jan 2016 00:32:38 +0100 Original-Received: (qmail 24400 invoked by uid 550); 14 Jan 2016 23:32: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: Original-Received: (qmail 24382 invoked from network); 14 Jan 2016 23:32:36 -0000 Content-Disposition: inline In-Reply-To: <1452811068.5797.9.camel@inria.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:9119 Archived-At: On Thu, Jan 14, 2016 at 11:37:48PM +0100, Jens Gustedt wrote: > Am Donnerstag, den 14.01.2016, 17:12 -0500 schrieb Rich Felker: > > There are already multiple reasons we don't use the compiler's > > atomics, either directly or indirectly via stdatomic.h. They're not > > supported in some old/alternative compilers, they generate highly > > suboptimal code even on modern compilers for some important archs > > (e.g. ARM), > > I have seen some pretty good assembler when using the > __atomic... builtins, so I can't completely follow, here. It generates "dmb sy" all over the place instead of "dmb ish". Synchronizing with external bus devices is NOT something you want to happen in thread synchronization primitives. Rich