RealExceptions.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Russ Atkinson (RRA) May 22, 1985 12:50:27 pm PDT
DIRECTORY
Basics USING [LongNumber],
PrincOps USING [PsbIndex],
Real USING [Exception, ExceptionFlags, Extended];
RealExceptions: CEDAR DEFINITIONS = BEGIN
FlagsArray: TYPE = ARRAY PrincOps.PsbIndex OF CombinedFlags;
CombinedFlags: TYPE = RECORD [
sticky: Real.ExceptionFlags,
exceptions: Real.ExceptionFlags
];
Init: UNSAFE PROC [lp: LONG POINTER TO FlagsArray];
Must be called to enable multi-process REAL exception handling.
ClearExceptions: PROC;
Clear the exceptions for the current process
ClearSticky: PROC;
Clear the sticky bits for the current process
ClearCombined: PROC;
Clear the exceptions & sticky bits for the current process
SetCombined: PROC [flags: CombinedFlags];
Sets the exception bits & sticky bits for the current process
SetException: PROC [which: Real.Exception];
Sets a given exception for the current process
SetSticky: PROC [which: Real.Exception];
Sets a given sticky bit for the current process
TestException: PROC [which: Real.Exception] RETURNS [BOOL];
Tests a particular exception for the current process
TestSticky: PROC [which: Real.Exception] RETURNS [BOOL];
Tests a particular sticky bit for the current process
GetExceptions: PROC RETURNS [Real.ExceptionFlags];
Samples the exceptions for the current process
GetSticky: PROC RETURNS [Real.ExceptionFlags];
Samples the sticky bits for the current process
GetCombined: PROC RETURNS [CombinedFlags];
Samples the exceptions & sticky bits for the current process
RaiseException: PROC [ext: Real.Extended] RETURNS [clientFixup: BOOL, fraction: Basics.LongNumber];
Raises Real.RealException with the current exception flags and the given extended number. Returns whatever the client directed if the client RESUMEs the signal.
END.