[M3devel] pthread_atfork

Jay K jay.krell at cornell.edu
Sat Apr 23 12:14:49 CEST 2011


This is in now.
Mika, can you try user threads again, and this time remove -pthread/-pthreads/-lpthread from your config files?
Really, if user threads are to be supported, I wish they were easier to use -- no need to rebuild m3core
or anything else, and specifiable in link or runtime commads.

More details below:


From: jay.krell at cornell.edu
To: m3devel at elegosoft.com
Subject: pthread_atfork
Date: Tue, 19 Apr 2011 06:07:01 +0000








I propose that RTProcess__RegisterForkHandlers be implemented at least 3 times:

...
manually for userthreads:
...
take a lock, maintain the three lists/growable arrays, whatever
probably implement it in Modula-3
[Jay April 23] done: implemented in C, locking via Disable/EnableSwitching, ok?

And then, introduce RTProcess__Fork.
Replace all calls to Unix.fork with it.
Also implemented around 3 times.
..

RTProcessWin32__Fork: assert(false)
 fork+exec must be implemented through higher level operations
 fork+do more work isn't possible
[Jay April 23] instead, just not provided



This doesn't help us figure out what is wrong with our pthreads implementation.
It just makes user threads not require -pthread.

[Jay April 23] still a major concern in need of significant investigation




 - Jay 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110423/9eb5c86c/attachment-0002.html>


More information about the M3devel mailing list