[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Wed Dec 29 10:36:12 CET 2010


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	10/12/29 10:36:12

Modified files:
	cm3/m3-libs/m3core/src/thread/: m3makefile 
	cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadPThreadC.c 
	                                        m3makefile 
	cm3/m3-libs/m3core/src/unix/Common/context/: m3makefile 

Log message:
	Switch OpenBSD to pthreads!
	Beware, I did once see:
	
	--- p244 --- gcc 4.5 backend crash with 'fre' optimization
	cd ../src/p2/p244 && cm3 -silent -DM3TESTS  >I386_OPENBSD/stdout.build.raw 2>I386_OPENBSD/stderr.build.raw
	
	***
	*** runtime error:
	***    Thread client error: 22
	***    file "../src/thread/PTHREAD/ThreadPThread.m3", line 130
	***
	
	EINVAL
	
	PROCEDURE UnlockMutex (m: Mutex) =
	(* LL = m *)
	BEGIN
	IF m.mutex = NIL THEN InitMutex(m.mutex, m, CleanMutex) END;
	WITH r = pthread_mutex_unlock(m.mutex) DO
	IF r # 0 THEN DieI(ThisLine(), r) END;  line 130
	END;
	END UnlockMutex;
	
	something to watch out for, try to stress test, see if it can be
	made to occur often/consistently, and fixed.
	Maybe initialize mutexes up-front instead of on-demand?
	
	Death to user threads??




More information about the M3commit mailing list