Oberon || Library || Module Index || Search Engine || Definition || Module
TYPE Coroutine = SYSTEM.COROUTINE; TYPE CoroutineTag = POINTER TO CoroutineTagRec; TYPE CoroutineTagRec = RECORD END;
VAR defaultsize: LONGINT; VAR tag: CoroutineTag; VAR main: Coroutine; VAR source: Coroutine; VAR current: Coroutine;
defaultsize defines the default stack size of a coroutine. The size of the activation record of the procedure calling SYSTEM.CRSPAWN is added to defaultsize. The default is taken if the second parameter of SYSTEM.CRSPAWN is omitted.
main is allocated during module initialization and points to the main coroutine.
The SYSTEM.CRSWITCH operation sets source to the calling coroutine.
current points to the coroutine currently active.
The pointer tag points to a tag record which is used by all coroutines. This allows coroutines to be identified by the garbage collector.
Oberon || Library || Module Index || Search Engine || Definition || Module