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.
Dependences<br />
Dependences are <strong>in</strong>tra-thread (with<strong>in</strong> one thread only).<br />
There are two k<strong>in</strong>ds of dependences:<br />
Data dependence — due to writ<strong>in</strong>g and read<strong>in</strong>g a memory location.<br />
Control dependence — due to branches such as if-statements.<br />
Only data dependences are considered <strong>in</strong> C11.<br />
As we will see, this can lead to unexpected results.<br />
When we talk about ”dependences” <strong>from</strong> now on, we only mean data<br />
dependences.<br />
Jonas Skeppstedt (js@cs.lth.se) Lecture 6 2013 31 / 70