[Ecls-list] MP stability improvement

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu Feb 9 20:50:12 UTC 2012

On Thu, Feb 9, 2012 at 11:10 AM, Matthew Mondor <mm_lists at pulsar-zone.net>wrote:

> So I again tested my simplified mutex.d implementation and
> interestingly, stability improved this time.  So what I did is to merge
> it along with the Windows support, which still uses the old
> holder/counter dance.  The new POSIX implementation avoids this and
> simply relies on the POSIX primitives as directly as possible in order
> to avoid race conditions.  I'm not familiar enough with Windows to
> suggest patches to its implementation, though.

Hi Matthew, I would like to understand what you did and in what sense it
fixes anything.

If you have a look at the history of ECL's mutex implementation, formerly
we would simply use POSIX. Just call the mutex routines and that's all.

Problem: there is absolutely no way to judge from POSIX whether a call to a
mutex routine succeeded or was interrupted. What to do with the
unwind-protect in that situation? If ECL does not keep a record of what
calls to pthread_mutex_lock() succeeded and which ones did not, then the
exit from with-lock will break.

I understand that the current implementation might not be very stable and
still have errors, but removing the additional layer does not solve the
problems, just hides some of them and causes new ones.


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20120209/e8c9ef85/attachment.html>

More information about the ecl-devel mailing list