Guardian Procedure Calls Reference Manual
SETLOOPTIMER Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
OSS Considerations
Example
Summary
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
#include <cextdecs(SETLOOPTIMER)>
_cc_status SETLOOPTIMER ( short new-time-limit
,[ short _near *old-time-limit ] );
• 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
CALL SETLOOPTIMER ( new-time-limit ! i
,[ old-time-limit ] ); ! o
Parameters
new-time-limit
input
INT:value
specifies the new time-limit value, in 0.01-second units, to be set into the process' loop timer.
new-time-limit must be a positive value.
If the value of new-time-limit is 0, process loop timing is disabled.
old-time-limit
output
INT:ref:1
returns the current setting of the process' loop timer (in 0.01-second units).
SETLOOPTIMER Procedure 1315