29.11.2015 Views

The C11 and C++11 Concurrency Model

1ln7yvB

1ln7yvB

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

240<br />

<strong>and</strong> the other is not, or if the two are separated by a zero-length bit-field declaration, or<br />

if they are separated by a non-bit-field declaration. It is not safe to concurrently update<br />

two bit-fields in the same struct if all fields between them are also bit-fields of non-zero<br />

width. — end note ]<br />

5 [ Example: A structure declared as<br />

struct {<br />

char a;<br />

int b:5,<br />

c:11,<br />

:0,<br />

d:8;<br />

struct {int ee:8;} e;<br />

}<br />

contains four separate memory locations: <strong>The</strong> field a <strong>and</strong> bit-fields d <strong>and</strong> e.ee are<br />

each separate memory locations, <strong>and</strong> can be modified concurrently without interfering<br />

with each other. <strong>The</strong> bit-fields b <strong>and</strong> c together constitute the fourth memory location.<br />

<strong>The</strong> bit-fields b <strong>and</strong> c cannot be concurrently modified, but b <strong>and</strong> a, for example, can be.<br />

— end example ]<br />

1.8 <strong>The</strong> C++ object model [intro.object]<br />

[elided]<br />

1.9 Program execution [intro.execution]<br />

Top-level judgement At the highest level, the st<strong>and</strong>ard claims to describe the<br />

behaviour of a program in terms of an abstract machine:<br />

1 <strong>The</strong> semantic descriptions in this International St<strong>and</strong>ard define a parameterized nondeterministic<br />

abstract machine. This International St<strong>and</strong>ard places no requirement on the<br />

structure of conforming implementations. In particular, they need not copy or emulate<br />

the structure of the abstract machine. Rather, conforming implementations are required

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!