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
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Standard</strong> Atomic Data Types <strong>in</strong> <br />
def<strong>in</strong>es basic atomic types <strong>in</strong>clud<strong>in</strong>g<br />
atomic_char atomic_schar atomic_uchar<br />
atomic_short atomic_sshort atomic_ushort<br />
atomic_<strong>in</strong>t atomic_s<strong>in</strong>t atomic_u<strong>in</strong>t<br />
atomic_long atomic_slong atomic_ulong<br />
atomic_llong atomic_sllong atomic_ullong<br />
atomic_wchar_t atomic_<strong>in</strong>tptr_t atomic_u<strong>in</strong>tptr_t<br />
atomic_address atomic_bool atomic_flag<br />
atomic_flag is a lock-free struct.<br />
The o<strong>the</strong>r types might be implemented with locks.<br />
An atomic flag can be <strong>in</strong>itialized with ATOMIC_FLAG_INIT.<br />
Jonas Skeppstedt (js@cs.lth.se) Lecture 6 2013 6 / 70