Date: Wed, 6 Jan 2016 10:39:34 +1100 From: Matthew Fernandez <matthew.fernandez@...ta.com.au> To: <musl@...ts.openwall.com> Subject: Re: string word-at-a-time and atomic.h FAQ on twitter 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 Musl-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 by newcomers (and myself once) assuming these were suitable 64-bit atomic primitives based on the naming. ________________________________ The information in this e-mail may be confidential and subject to legal professional privilege and/or copyright. National ICT Australia Limited accepts no liability for any damage caused by this email or its attachments.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.