<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 4, 2016 at 2:21 PM, Kjetil Matheussen <span dir="ltr"><<a href="mailto:k.s.matheussen@gmail.com" target="_blank">k.s.matheussen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Fri, Mar 4, 2016 at 2:12 PM, Paul Davis <span dir="ltr"><<a href="mailto:paul@linuxaudiosystems.com" target="_blank">paul@linuxaudiosystems.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>kjetil, thanks for the patch. <br><br></div>however, the problem with fixing this problem has never been identifying where to put the barriers, it has been adding them in a portable way. __atomic_* are, as far as i can tell, gcc-specific. am i wrong about that?<br></div><div class="gmail_extra"><br></div></blockquote><div><br></div></span><div>I think you're almost correct. Clang supports them too,  so __atomic_* functions are portable across</div><div>linux/osx/mingw for the three major platforms.</div><div><br></div></div></div></div></blockquote><div><br></div><div>Regarding the microsoft c compiler, which I don't think supports the __atomic_ functions, the "volatile" keyword actually</div><div>works by default as it should: <a href="http://preshing.com/20141024/my-multicore-talk-at-cppcon-2014/">http://preshing.com/20141024/my-multicore-talk-at-cppcon-2014/</a>  , so in order to support</div><div>the microsoft c compiler, it's just a matter of creating dummy-macros for the __atomic_-functions.</div></div><br></div></div>