Transition to C11 atomics and memory model

Florian Weimer fweimer@redhat.com
Mon Sep 15 13:56:00 GMT 2014


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



More information about the Libc-alpha mailing list