[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Mon Dec 14 14:57:30 CET 2009


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	09/12/14 14:57:30

Added files:
	cm3/m3-libs/m3core/src/unix/Common/context/sigaltstack/: 
	                                                         Makefile 
	                                                         config.c 
	                                                         context.c 
	                                                         context.h 
	                                                         m3makefile 
	                                                         tcontext.c 

Log message:
	working version of http://www.engelschall.com/pw/usenix/2000/pmt-html/
	- This should be moved to m3core/src/thread/POSIX
	- Notice how I switched from virtual timer to real timer,
	in the test case that mimics m3core/src/thread/POSIX.
	"This seems to work much better."
	In particular, if the main thread does while (1) sleep(0)
	to let things run, nothing runs. The virtual time doesn't
	run down at all. If I make it a busy wait "while (1) ;" then
	it does work.
	
	Note that Apple seems very down on supplying get/make/set/swapcontext (read the mailing lists).
	This solution might be preferred? Though it is slower to create a thread here, due to
	extra gymnastics to establish the initial context.
	
	Also still some experiments to try.
	_setjmp vs. setjmp vs. sigsetjmp.
	Best is probably sigsetjmp(1).
	using the same signal in both parts




More information about the M3commit mailing list