mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Matthew Fernandez <matthew.fernandez@nicta.com.au>
To: <musl@lists.openwall.com>
Subject: Re: string word-at-a-time and atomic.h FAQ on twitter
Date: Wed, 6 Jan 2016 10:39:34 +1100	[thread overview]
Message-ID: <568C5436.8040100@nicta.com.au> (raw)
In-Reply-To: <20160105175040.GA238@brightrain.aerifal.cx>

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.


  reply	other threads:[~2016-01-05 23:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 16:46 Szabolcs Nagy
2016-01-05 17:50 ` Rich Felker
2016-01-05 23:39   ` Matthew Fernandez [this message]
2016-01-06  2:56     ` Szabolcs Nagy
2016-01-08 21:59   ` Alexander Cherepanov
2016-01-08 22:05     ` Rich Felker
2016-01-08 22:39       ` Alexander Cherepanov
2016-01-08 22:59         ` Rich Felker
2016-01-09  1:40           ` Szabolcs Nagy
2016-01-12 12:41           ` Alexander Cherepanov
2016-01-12 21:02 ` Alexander Cherepanov
2016-01-12 21:09   ` Alexander Cherepanov
2016-01-12 23:07     ` Szabolcs Nagy
2016-01-13 17:30       ` Szabolcs Nagy
2016-01-14 12:49         ` Szabolcs Nagy
2016-01-14 22:51         ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=568C5436.8040100@nicta.com.au \
    --to=matthew.fernandez@nicta.com.au \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).