[M3devel] swaping user threads for kernel threads w/o rebuilding everything?

Jay K jay.krell at cornell.edu
Sun Apr 29 01:59:47 CEST 2012


To repeat myself: It'd be nice if both sets of code was compiled/linked together and the threading model was selectable via a command line switch and/or link-time option.
I understand that would inhibit inlining via function pointers/dynamic linking.
Inlining that we surely don't do anyway and whose analog doesn't occur in other C/C++ systems.
Taking/releasing a lock would always incur a function call through a pointer.


As it is, you can't even swap m3core.so out, because the types are too different. You have to recompile or at least relink everything.


I could do the work, but I believe so far that Tony doesn't want it.



 - Jay


> To: dragisha at m3w.org
> Date: Sat, 28 Apr 2012 09:50:38 -0700
> From: mika at async.caltech.edu
> CC: m3devel at elegosoft.com
> Subject: Re: [M3devel] Mika's thread test, -tests read
> 
> 
> Yes I have done it with user threads on CM3.  
> 
> (BTW, that is the configuration I always use on Darwin and Linux for "work".)
> 
> There are a few ways of doing the configuration.  The main thing is that the
> file 
> 
> m3-libs/m3core/src/thread/m3makefile
> 
> contains the code >>>
> 
> include_dir ("Common")
> 
> 
> if equal (OS_TYPE, "WIN32") or equal(TARGET, "NT386")
>     include_dir ("WIN32")
> else
>     if (NO_USER_THREADS contains TARGET) or ((not defined("NOPTHREAD")) and USE_PTHREADS{TARGET})
>         include_dir("PTHREAD")
>     else
>         include_dir (OS_TYPE)
>     end
> end
> 
> <<<
> 
> NO_USER_THREADS and USE_PTHREADS come from the config file.
> 
>      Mika
> 
> =?utf-8?Q?Dragi=C5=A1a_Duri=C4=87?= writes:
> >Mika said it does not happen with user threads. But he also said he is =
> >using pm3 mostly=E2=80=A6 So question is - did he run it with cm3, any =
> >version, with user threads.
> >
> >What are build parameters for cm3 with user threads?=20
> >
> >On Apr 28, 2012, at 2:58 PM, Antony Hosking wrote:
> >
> >> That means it is even more serious.
> >> Can we verify that it only happens with pthread threading?
> >>=20
> >> Sent from my iPad
> >>=20
> >> On Apr 28, 2012, at 1:49 AM, Dragi=C5=A1a Duri=C4=87 =
> ><dragisha at m3w.org> wrote:
> >>=20
> >>> It's not only AMD64_* if it's any consolation: :)
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120428/a89eda4c/attachment-0002.html>


More information about the M3devel mailing list