<div class="gmail_quote">On Sat, Feb 11, 2012 at 10:14 PM, Juan Jose Garcia-Ripoll <span dir="ltr"><<a href="mailto:juanjose.garciaripoll@googlemail.com">juanjose.garciaripoll@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I believe this would still work in the Windows implementation, where locks are always recursive, but it strongly relies on having libatomics compiled in for CAS support.</div></blockquote></div><br clear="all"><div>
Sorry, I mixed up the code of the two functions a bit. I notice that there is still a problem when the code gets interrupted before the owner is set and the user does not unwind. This would happen, for instance, when the thread is suspended by the garbage collector.</div>
<div><br></div><div>I have been toying for the last hour with alternatives, but while there are some that profit from POSIX's error detection by forcing all locks to be non-recursive, those do not work at all in Windows.</div>
<div><br></div><div>Definitely this all is rather messy :) I wonder whether it would make sense to use CAS + wait times as SBCL does.</div><div><br></div><div>Juanjo</div><div><br></div>-- <br>Instituto de Física Fundamental, CSIC<br>
c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>