[M3devel] 5.8.6 LINUXLIBC6 breakage, kernel 2.6.23, glibc-2.6-4

Jay K jay.krell at cornell.edu
Tue Apr 19 01:28:20 CEST 2011


"Green" threads are probably another name for user threads. Java used to use something with this name.
 
 > Also, in the current CM3 HEAD implementation, are we still using Windows native threads on WIN32 platforms?

Certainly. Has anything ever given you a different impression?
 
Cygwin maybe uses pthreads, but that'd still use Win32 threads under the covers.
 
It *might* be nice to have a user thread option that used fibers or Win7's UMS (64-bit only!) but don't hold your breath.
Native Win32 threads have been around forever and will be a good option forever and will be in heavy use forever.
 
 - Jay 
 
> From: rcolebur at SCIRES.COM
> To: m3devel at elegosoft.com
> Date: Mon, 18 Apr 2011 17:35:40 -0400
> Subject: Re: [M3devel] 5.8.6 LINUXLIBC6 breakage, kernel 2.6.23, glibc-2.6-4
> 
> I think it would be good at this point to clarify for folks on the m3devel list what is meant by the various terms:
> -pthreads
> -user threads
> -Win32 native threads
> -green threads
> -etc.
> 
> I think I know what all these mean, except for "green" threads, but I'm not quite sure anymore.
> 
> Also, in the current CM3 HEAD implementation, are we still using Windows native threads on WIN32 platforms?
> 
> I too am observing problems with threading on Windows not behaving well. This situation concerns me because thread safety is something I've always relied on Modula-3 to provide.
> 
> I think we need to post how the various threading models map to the various implementation platforms, and what options one needs to use to select between the models, and on which platforms a choice of threading model is available.
> 
> Regards,
> Randy Coleburn
> 
> -----Original Message-----
> From: Mika Nystrom [mailto:mika at async.caltech.edu] 
> Sent: Monday, April 18, 2011 2:46 PM
> To: Tony Hosking
> Cc: m3devel at elegosoft.com
> Subject: Re: [M3devel] 5.8.6 LINUXLIBC6 breakage, kernel 2.6.23, glibc-2.6-4
> 
> Tony Hosking writes:
> ...
> >pthread_atfork should not be needed under user threads.
> ...
> 
> The following code from RTProcessC.c ensures that it is neeeded on every Unix except
> FreeBSD before 6. The comment is from the checked-in source file.
> 
> /* NOTE: Even userthreads now depends
> * on availability of pthreads.
> * This can be fixed if need be.
> */
> 
> INTEGER
> __cdecl
> RTProcess__RegisterForkHandlers(
> ForkHandler prepare,
> ForkHandler parent,
> ForkHandler child)
> {
> /* FreeBSD < 6 lacks pthread_atfork. Would be good to use autoconf.
> * VMS lacks pthread_atfork? Would be good to use autoconf.
> * Win32 lacks pthread_atfork and fork. OK.
> *
> * As well, for all Posix systems, we could implement
> * atfork ourselves, as long as we provide a fork()
> * wrapper that code uses.
> */
> #if defined(_WIN32) \
> || defined(__vms) \
> || (defined(__FreeBSD__) /* && (__FreeBSD__ < 6)*/ )
> return 0;
> #else
> while (1)
> {
> int i = pthread_atfork(prepare, parent, child);
> if (i != EAGAIN)
> return i;
> sleep(0);
> }
> #endif
> }
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110418/b2c0dfdc/attachment-0002.html>


More information about the M3devel mailing list