[2nd attempt after three days]
On 2012-10-05 10:35, Andy Lutomirski wrote:
>
> I'm trying to userstand the memory model. [intro.multithread] mentions
> lots of things like:
>
> A release sequence ... is a maximal contiguous sub-sequence of side
effects
>
> I know what a /visible/ side effect is (see #13), but that doesn't tell
> me what a side effect is in the first place. I assume that a "side
> effect" is just a write (e.g. "a = b" has a side effect of modifying a=
),
> but AFAICS the N3376 has no language to support that assumption.
I think that the current wording defines what a /side effect/ is. This
is specified in [intro.execution] p12:
"Accessing an object designated by a volatile glvalue (3.10), modifying
an object, calling a library I/O function, or calling a function that
does any of those operations are all /side effects/, which are changes
in the state of the execution environment. Evaluation of an expression
(or a sub-expression) in general includes both value computations
(including determining the identity of an object for glvalue evaluation
and fetching a value previously assigned to an object for prvalue
evaluation) and initiation of side effects. When a call to a library I/O
function returns or an access to a volatile object is evaluated the side
effect is considered complete, even though some external actions implied
by the call (such as the I/O itself) or by the volatile
access may not have completed yet."
HTH & Greetings from Bremen,
Daniel Kr=FCgler