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.
Lock Free Property<br />
To know whe<strong>the</strong>r <strong>the</strong> o<strong>the</strong>r basic atomic types are lock free, <strong>the</strong><br />
follow<strong>in</strong>g macros can be evaluated:<br />
ATOMIC_CHAR_LOCK_FREE<br />
ATOMIC_CHAR16_T_LOCK_FREE<br />
ATOMIC_CHAR32_T_LOCK_FREE<br />
ATOMIC_WCHAR_T_LOCK_FREE<br />
ATOMIC_SHORT_LOCK_FREE<br />
ATOMIC_INT_LOCK_FREE<br />
ATOMIC_LONG_LOCK_FREE<br />
ATOMIC_LLONG_LOCK_FREE<br />
ATOMIC_ADDRESS_LOCK_FREE<br />
If for example ATOMIC_INT_LOCK_FREE is true <strong>the</strong>n both<br />
_Atomic signed <strong>in</strong>t and _Atomic unsigned <strong>in</strong>t are lock-free.<br />
Jonas Skeppstedt (js@cs.lth.se) Lecture 6 2013 7 / 70