Guardian Procedure Calls Reference Manual
param1
input
INT:value
identifies the timeout message read from $RECEIVE.
param2
input
INT(32):value
identifies the timeout message read from $RECEIVE (same purpose as param1).
tag
output
INT:ref:1
returns an identifier associated with the timer. This tag should be used only to call the
CANCELPROCESSTIMEOUT procedure.
Condition Code Settings
indicates that SIGNALPROCESSTIMEOUT is unable to allocate a time-list element (TLE).< (CCL)
indicates that SIGNALPROCESSTIMEOUT is successful.= (CCE)
indicates that the given timeout value is invalid or that there is a bounds error on tag.> (CCG)
Considerations
• SIGNALPROCESSTIMEOUT and CANCELPROCESSTIMEOUT
A process can use the SIGNALPROCESSTIMEOUT procedure with the
CANCELPROCESSTIMEOUT procedure to verify that some programmatic operation finishes
within a certain process execution time. The process calls SIGNALPROCESSTIMEOUT before
initiating the operation and then periodically reads $RECEIVE to watch for timer expiration.
The process calls CANCELPROCESSTIMEOUT after completion of the timed operation if the
process has not been signaled on $RECEIVE.
• Measuring the time that a process is executing
The SIGNALPROCESSTIMEOUT procedure measures the time that the process is executing
user code and system code. This procedure excludes the time spent by the processor processing
interrupts while the process is running.
• Deadlock possibility
Consider this example:
CALL SIGNALPROCESSTIMEOUT (10000D,,,TAG);
CALL READ (REC^NUM, BUFFER, 4);
.
. ! open number of $RECEIVE.
The read causes the process to stop and wait for the system message to be generated by
timeout (assuming no other messages are expected). Timeout does not occur because process
time does not advance while the read is waiting, so a deadlock occurs.
NOTE: This deadlock does not happen with the SIGNALTIMEOUT procedure, which measures
elapsed time (as measured by the processor clock) rather than process execution time.
OSS Considerations
OSS processes can use this procedure and generate a system message. An OSS signal is not
generated.
1378 Guardian Procedure Calls (S)