<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 4, 2016 at 1:22 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"><div class="gmail_extra"><div class="gmail_quote"><div>You are right. There was even a discussion about how broken it was</div><div>in 2008, and it was fixed, at least in practice.</div><div><a href="http://lists.linuxaudio.org/pipermail/linux-audio-user/2008-October/056000.html" target="_blank">http://lists.linuxaudio.org/pipermail/linux-audio-user/2008-October/056000.html</a><br></div><div><br></div><div>Theoretically (and not unlikely also in practice), it seems to be still broken.</div><div>This can also confirmed by compiling with -fsanitize=thread:</div><div><br></div></div></div></div></blockquote><div><br></div><div>I made a quick fix: <a href="http://folk.uio.no/ksvalast/ringbuffer.diff">http://folk.uio.no/ksvalast/ringbuffer.diff</a></div><div><br></div><div>It can probably be optimized by relaxing some of the barrier strenghtnessness though,</div><div>but it probably makes no practical difference in execution time.</div><div>Perhaps apply this to jack, at least to avoid uncertainty about whether it will really</div><div>always work?</div><div><br></div></div></div></div>