[M3devel] Latest ThreadPThread

Jay jay.krell at cornell.edu
Tue Apr 21 06:44:33 CEST 2009


The Interlocked doesn't have a strong reason.
It's fairly cheap at least.
There are places in the Modula-3 code with comments about inc/dec taking one instruction,
which these would but otherwise I'm skeptical..

 


 - Jay


 


From: hosking at cs.purdue.edu
To: hosking at cs.purdue.edu
Date: Tue, 21 Apr 2009 11:58:31 +1000
CC: m3devel at elegosoft.com; jay.krell at cornell.edu
Subject: Re: [M3devel] Latest ThreadPThread

Jay, I am curious why you are using atomic operations for INC and DEC of inCritical (on WIN32/WIN64).  In general, they are protected by an appropriate lock, so I don't know what the need is.  Are you trying to move towards lock-free implementations of some of the thread primitives?





Antony Hosking | Associate Professor | Computer Science | Purdue University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484



On 21 Apr 2009, at 11:53, Tony Hosking wrote:


Jay,


I have some questions about why you have moved the Activation declaration to C code.  I'm not sure what this gains, and I have strong reasons for wanting to keep it in Modula-3.  I'd like to revert these most recent changes if possible, unless you can say why you want to retain them.  Perhaps you have a good reason, but I remain to be convinced.


-- Tony



Antony Hosking | Associate Professor | Computer Science | Purdue University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20090421/fce4666e/attachment-0002.html>


More information about the M3devel mailing list