Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (S)
Guardian Procedure Calls Reference Manual522629-013
14-63
SETLOOPTIMER Procedure
SETLOOPTIMER Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
OSS Considerations
Example
Summary
A call to the SETLOOPTIMER procedure sets the caller’s “process loop-timer” value.
A positive loop-timer value enables process loop timing by the operating system and
specifies a limit on the total amount of processor time the calling process is allowed. If
loop timing is enabled, the operating system decrements the loop-timer value as the
process executes (that is, is in the active state). If the loop timer is decremented to 0
(indicating that the time limit is reached), then the timer expires. For a Guardian TNS
process, a “process loop-timer timeout” trap occurs (trap number 4). For an OSS
process or native process, a
SIGTIMEOUT signal is generated. Loop timing is disabled
by specifying a loop-timer value of 0.
Syntax for C Programmers
The function value returned by SETLOOPTIMER, which indicates the condition
code, can be interpreted by the
_status_lt(), _status_eq(), or
_status_gt() function (defined in the file tal.h).
Syntax for TAL Programmers
Parameters
new-time-limit input
INT:value
specifies the new time-limit value, in 0.01-second units, to be set into the process’s
loop timer.
new-time-limit must be a positive value.
#include <cextdecs(SETLOOPTIMER)>
_cc_status SETLOOPTIMER ( short new-time-limit
,[ short _near *old-time-limit ] );
CALL SETLOOPTIMER ( new-time-limit ! i
,[ old-time-limit ] ); ! o