[M3devel] thread calls on non-modula3 threads, win32 vs. posix

Jay K jay.krell at cornell.edu
Sat Sep 25 11:35:12 CEST 2010


PROCEDURE AlertWait (m: Mutex; c: Condition) RAISES {Alerted} =
  (* LL = m *)
  VAR self := GetActivation();
  BEGIN
    IF DEBUG THEN ThreadDebug.AlertWait(m, c); END;
    IF self = NIL THEN Die(ThisLine(), "AlertWait called from non-Modula-3 thread") END;
    XWait(m, c, self, alertable := TRUE);
  END AlertWait;


The pthread code doesn't have the check for NIL and call to Die.
Nor for that matter, the uses of ThreadDebug -- which I added.

I think these should be more similar.

What I was really wondering about, again, is more common code between Win32 and Posix
in the thread code... 

 - Jay
 		 	   		  


More information about the M3devel mailing list