<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Control of memory ordering and atomics are officially part of the C<br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
and C++ languages since 2011. GCC already supported this when the ISO<br>
standards was finalized. Microsoft and Clang started supporting it in<br>
2012. So, it's been pretty much portable since 2012. This is 2016.<br>
IMHO, it's time to make use of it. :)</blockquote><div><br></div><div><br></div><div>Well, atomics are not an official part of the C standard, only the C++</div><div>standard. For the jack ringbuffer, Paul could wrap std::atomic into</div><div>a C interface in order to follow a langauge standard, but for all practical</div><div>purposes, the __atomic_ functions are probably fine to use directly.</div><div><br></div></div></div></div>