(* At present stack checking '-s' does not condsider coroutines     *)
(* Therefore if you use this module make sure stack checking is off *)

DEFINITION FOR C MODULE Coroutines ;

FROM SYSTEM IMPORT ADDRESS ;

TYPE
  PROCESS = ADDRESS ;

PROCEDURE TRANSFER( VAR source , destination : PROCESS ) ;

PROCEDURE NEWPROCESS( start : PROC ;
		      stack : ADDRESS ;
		      size  : LONGINT ;
		  VAR new   : PROCESS ) ;

END Coroutines.

