perm filename CHANGE.RHT[DOC,AIL] blob sn#075285 filedate 1973-12-03 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00003 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	CHANGES for processes.
C00006 00003	Random Language Features
C00008 ENDMK
C⊗;
CHANGES for processes.

1. "Sprout apply " is now implemented.

The <procedure call> in a SPROUT statement may be an APPLY construct.
In  this case SPROUT will  do the "right" thing  about setting up the
static link for  the APPLY. I.e. the  applied procedure will  perform
"uplevel" references  just as  though it were  called directly.   The
sprouted  process, however,   will be put  into the kill  set for the
outer block instead of the kill set for the static parent block. This
may be fixed  eventually, but in the meantime  some extra care should
be taken  when using  sprout  apply to  avoid  exiting a  block  with
dependents, since the bug trap provided by the system will not always
work  for sprout applys.   Similarly, be warned  that the "DEPENDENTS
<blockid>" construct  may  not give  the  "right" result  for  sprout
applies.

2. SPROUT_DEFAULTS

SAIL  now provides  a mechanism  by which  the user  may specify  the
"default" options to be used when individual procedures are sprouted.

Syntax:
	PROCEDURE <procid> ...
	 BEGIN
	 <declarations>*
	 SPROUT_DEFAULTS <integer constant>;
	 <declarations>*
	 :
	 <statements>
	 END;

	I.e. SPROUT_DEFAULTS is a declaration.

Semantics:

If  one of the "allocation" fields of  the options word passed to the
SPROUT routine -- i.e. QUANTUM,STRINGSTACK,PSTACK, or  PRIORITY -- is
zero,   then  SPROUT  will look  at  the corresponding  field of  the
specified <integer constant> for the procedure being sprouted. If the
field is  non-zero,   then  that value  will be  used; otherwise  the
current "system" default will be used.

NOTE:  SPROUT_DEFAULTS  only applies  to  "allocations".   I.e.   the
process status control bits (e.g. SUSPME) are not affected.

Example:

	RECURSIVE PROCEDURE FOO;
	 BEGIN
	 SPROUT_DEFAULTS STRINGSTACK(10);
	 INTEGER XXX;
	 :
	 END;
	:
	SPROUT(P1,FOO,STRINGSTACK(3));
	SPROUT(P2,FOO);
	COMMENT P1 will have a string stack of 3*32 words.
	 P2 will have a string stack of 10*32 words.
	;

3. ivar1←SUSPEND(ivar2,opt)

SUSPEND is now an itemvar procedure.  This allows a process suspended
by

	x←SUSPEND(MYPROC);

to be restarted via a coroutine call that can supply a return value.

4. CALLER(<newly sprouted process>) is the sprouter of that process;

Random Language Features

1. Multiple user initialization phases.

User initializations  are  now done  in successive  phases, with  all
initializations   required   for   one   phase   being  done   before
initializations required for the next phase. 

Syntax:

	REQUIRE <procid> INITIALIZATION;
	REQUIRE <procid> INITIALIZATION [<phase no>];

where <phase no> is an integer constant. 

Semantics:

	<phase no> specifies  the number  of the user  initialization
phase.  If  it is left out,  then one is used.   Currently, there are
three  phases, numbered 0,1, and  2.  If the  demand is great enough,
additional phases may  be added later.   (note for assembly  language
hackers: internally, user phases are numbered '400000, '400001, etc.)

2. val←CHNCDB(channel)

This integer procedure returns a pointer to the three word block used
to open the  specified channel.   It is provided  for the benefit  of
assembly language procedures that may want to do I/O inside some fast
inner loop, but which may want to live in a SAIL core image & use the
SAIL OPEN, etc.