06.08.2013 Views

Threads in the new ISO C Standard from 2011

Threads in the new ISO C Standard from 2011

Threads in the new ISO C Standard from 2011

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Initializ<strong>in</strong>g an Atomic Object<br />

The <strong>in</strong>itialization itself is not atomic!<br />

Ei<strong>the</strong>r use ATOMIC_VAR_INIT(value), or<br />

void atomic_<strong>in</strong>it(volatile A* ptr, C value);<br />

Jonas Skeppstedt (js@cs.lth.se) Lecture 6 2013 8 / 70

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

Saved successfully!

Ooh no, something went wrong!