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.

Dependency-Ordered<br />

A release sequence is a maximal sequence of modifications of M<br />

headed by a release operation on M and performed by that thread or<br />

by o<strong>the</strong>r threads perform<strong>in</strong>g atomic read-modify-write accesses on M.<br />

Recall, a consume operation is like an acquire except it allows more<br />

optimizations on some mach<strong>in</strong>es, e.g. on <strong>the</strong> Power it becomes an<br />

ord<strong>in</strong>ary load <strong>in</strong>struction.<br />

An evaluation A <strong>in</strong> one thread is dependency ordered before an<br />

evaluation B <strong>in</strong> ano<strong>the</strong>r thread if:<br />

A performs a release operation on an atomic object M and B performs<br />

a consume operation on M and reads a value written by any side effect<br />

of A <strong>in</strong> <strong>the</strong> release sequence of A, or<br />

for some evaluation X , A is dependency ordered before X and X<br />

carries a dependency to B.<br />

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

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

Saved successfully!

Ooh no, something went wrong!