ProcessProps.mesa
Russ Atkinson, April 14, 1983 1:46 pm
DIRECTORY
List USING [AList];
ProcessProps: CEDAR DEFINITIONS = BEGIN
AddPropList: PROC [propList: List.AList, inner: PROC];
... adds the given properties to the current process for the duration of the call of inner. The old property list for the process will not be altered, but will be found at the end of the propety list during the call to inner. The old property list will be restored after the call has completed. The new propList will be copied if an old property list exists.
PushPropList: PROC [propList: List.AList, inner: PROC];
... sets the property list for the current process for the duration of the call of inner. The old property list will be restored after the call has completed. The new propList will not be copied. Most applications should use AddPropList to properly inherit properties.
GetPropList: PROC RETURNS [propList: List.AList];
... returns the current property list for the current process. Although there is no prohibition from altering the returned list, users are encouraged to follow the style of adding new properties, rather than changing old associations.
The following two operations are safe, but operations on PROCESS values are, in general, not safe, since processes are reused. These operations should be regarded as instantaneous samples, where the results are likely to change without notice. However, statistics-style applications and may find these operations useful despite these caveats. It is also OK to ask whether a process still has some property if that property will not be reused.
GetSpecificPropList: PROC [process: PROCESS] RETURNS [propList: List.AList];
... returns the current property list for the specified process
GetNextPropList: PROC
[process: PROCESSNIL] RETURNS [next: PROCESS, propList: List.AList];
... returns the next process with a non-NIL propList. Use GetNextPropList[NIL] to start the iteration. [NIL, NIL] will be returned if no more processes exist. The processes are produced in increasing order.
END.