This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Transition to C11 atomics and memory model
- From: Florian Weimer <fweimer at redhat dot com>
- To: Torvald Riegel <triegel at redhat dot com>, GLIBC Devel <libc-alpha at sourceware dot org>
- Date: Mon, 15 Sep 2014 15:56:53 +0200
- Subject: Re: Transition to C11 atomics and memory model
- Authentication-results: sourceware.org; auth=none
- References: <1410719669 dot 4967 dot 160 dot camel at triegel dot csb>
On 09/14/2014 08:34 PM, Torvald Riegel wrote:
I think we should transition to using the C11 memory model and atomics
instead of the current custom implementation. There are two reasons for
this:
What's the quality of the C11 memory specification? The things I've
seen so far do not inspire confidence, e.g.:
âThe value of an object visible to a thread T at a particular point is
the initial value of the object, a value stored in the object by T, or a
value stored in the object by another thread, according to the rules
below.â (5.1.2.4/7, perhaps just an âatomicâ is missing somewhere.)
âUnlike memset, any call to the memset_s function shall be evaluated
strictly according to the rules of the abstract machine as described in
(5.1.2.3).â (K.3.7.4.1/4, if this means anything at all, it seems to
require suspending all other threads in the program)
--
Florian Weimer / Red Hat Product Security