From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9064 Path: news.gmane.org!not-for-mail From: Matthew Fernandez Newsgroups: gmane.linux.lib.musl.general Subject: Re: string word-at-a-time and atomic.h FAQ on twitter Date: Wed, 6 Jan 2016 10:39:34 +1100 Message-ID: <568C5436.8040100@nicta.com.au> References: <20160105164640.GL23362@port70.net> <20160105175040.GA238@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1452037211 15744 80.91.229.3 (5 Jan 2016 23:40:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Jan 2016 23:40:11 +0000 (UTC) To: Original-X-From: musl-return-9077-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jan 06 00:40:11 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 1aGbCz-0004U6-3Z for gllmg-musl@m.gmane.org; Wed, 06 Jan 2016 00:40:09 +0100 Original-Received: (qmail 18330 invoked by uid 550); 5 Jan 2016 23:40:05 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 18310 invoked from network); 5 Jan 2016 23:40:05 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 In-Reply-To: <20160105175040.GA238@brightrain.aerifal.cx> X-TM-AS-Product-Ver: SMEX-11.0.0.1251-8.000.1202-22048.003 X-TM-AS-Result: No--7.727400-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Xref: news.gmane.org gmane.linux.lib.musl.general:9064 Archived-At: On 06/01/16 04:50, Rich Felker wrote: > On Tue, Jan 05, 2016 at 05:46:41PM +0100, Szabolcs Nagy wrote: >> ... however i find lto a >> weak excuse to rewrite strlen in asm for all targets since lto >> of libc is still not practical ... This is an interesting comment; would you mind expanding on this a little? = Though we don't do it regularly, we have used LTO on Musl C in the past. I am not aware of any Mu= sl-specific issues we encountered, though it's entirely possible our build contained latent bugs. >> 2) musl atomic.h sync primitives >> >> the primitives in atomic.h are carefully designed for musl's >> pthread implementation (which seems to me far ahead of other >> implementations in terms of correctness and portability). >> >> however they are not documented in the code (only in the git >> log) so ppl assume they understand their precise interface >> contract by guessing (which is usually wrong because the names >> are misleading). >> >> musl does not use 64-bit atomic primitives, a_and_64 and a_or_64 >> have secific uses in the malloc implementation which determine >> their semantics. > > I think we could replace them with atomic bitset/bitclear. They're > only used in a couple places, mainly malloc. This would certainly make us happier. We've been bitten a couple of times b= y newcomers (and myself once) assuming these were suitable 64-bit atomic primitives based on the na= ming. ________________________________ The information in this e-mail may be confidential and subject to legal pro= fessional privilege and/or copyright. National ICT Australia Limited accept= s no liability for any damage caused by this email or its attachments.