From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Deduplicating atomics written in terms of CAS
Date: Mon, 18 May 2015 12:19:34 +0200 [thread overview]
Message-ID: <20150518101933.GD11258@port70.net> (raw)
In-Reply-To: <1431901387.4219.7.camel@inria.fr>
* Jens Gustedt <jens.gustedt@inria.fr> [2015-05-18 00:23:07 +0200]:
>
> The advantage of C11's model for atomic is that this a qualifier, and
> then the compiler automatically checks (or ensures) that all accesses
> are atomic. We don't have that luxury, here, but we could get a bit
> closer to it.
>
the qualifierness of atomic is a bit confusing
differently qualified types had the same alignment and representation
so far and in some cases pointers to differently qualified types are
implicitly convertible (eg assigning char* to const char* is ok).
atomic is special: when the standard says 'qualified or unqualified type'
it does not include _Atomic even though it is called a qualifier.
(atomic is always mentioned explicitly, it can have different representation
and alignment to allow implementation with locks and thus the pointers
cannot be convertible)
annotating everything with _Atomic in musl is problematic because the
atomic bits are publicly visible in pthread types (we could use _Atomic
only when building musl, but i think its usefulness should be demonstrated
with examples etc before doing something that ugly.. having a_load_relaxed
without typesystem help does not sound very useful)
next prev parent reply other threads:[~2015-05-18 10:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-17 4:55 Rich Felker
2015-05-17 6:00 ` Alexander Monakov
2015-05-17 6:14 ` Rich Felker
2015-05-17 7:37 ` Jens Gustedt
2015-05-17 16:28 ` Rich Felker
2015-05-17 16:59 ` Jens Gustedt
2015-05-17 17:59 ` Rich Felker
2015-05-17 22:23 ` Jens Gustedt
2015-05-17 22:33 ` Rich Felker
2015-05-17 23:22 ` Jens Gustedt
2015-05-18 10:19 ` Szabolcs Nagy [this message]
2015-05-18 11:03 ` Jens Gustedt
2015-05-17 6:49 ` Jens Gustedt
2015-05-17 16:22 ` Rich Felker
2015-05-17 17:19 ` Jens Gustedt
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=20150518101933.GD11258@port70.net \
--to=nsz@port70.net \
--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).