[M3devel] ease of switching between pthreads and userthreads?

Tony Hosking hosking at cs.purdue.edu
Sat Apr 23 21:04:16 CEST 2011


The problem is that you are forced to link with pthreads for the whole executable which may cause problems. Not sure why though. 

Sent from my iPhone

On Apr 23, 2011, at 6:19 AM, Jay K <jay.krell at cornell.edu> wrote:

> I've asked before. I'm asking again.
> 
> 
> I'd like to be able to switch between userthreads and pthreads via a command line switch to the executable.
> @M3pthreads @M3userthreads
> or somesuch.
> 
> 
> I'd also like to be able to switch the default via a line in a m3makefile that builds a program.
> 
> 
> I know roughly what implementing this would look like.
> 
> 
> I am a bit confused as to what problems -pthread/-pthreads/-lpthread causes.
> I'll have to reread.
> Whatever problem it has, this change probably would too.
> 
> 
> I'm willing to implement this myself.
> I'm not asking for anyone else to do it.
> 
> 
> I understand it makes LOCK harder to efficiently inline.
> If/when LOCK becomes partly inlined, provide a switch?
> 
> 
> Thank you,
>  - Jay
> 



More information about the M3devel mailing list