[M3devel] ease of switching between pthreads and userthreads?

Olaf Wagner wagner at elegosoft.com
Thu Apr 28 09:29:14 CEST 2011

Quoting Tony Hosking <hosking at cs.purdue.edu>:

> On Apr 27, 2011, at 3:05 AM, Jay K wrote:
>> About inlining LOCK I was more echoing your past sentiment
>> than giving my own, and I provided a mitigation:
>>  a) specifically the suggestion that the switchability be an option;
>>   it'd probably be on by default but people that want to squeeze
>>   out the extra performance could enable the inlining
>>   and lose the switchability
> It is expected that LOCK will be implemented using CAS (and   
> equivalents) in the very near future.  I have a student working on   
> it.  This will be incompatible with the current user-threads   
> implementation of LOCK.  It will be too painful to support both   
> using a compiler switch.

Couldn't we change the existing user threads to use CAS for locks, too,
in order to gain runtime switching of thread implementations?
I have neither thought much about it nor looked at the implementation
in recent years, so I hope it's no stupid question.

Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194

More information about the M3devel mailing list