Distributed Systems Network Management (DSNM) Subsystem Interface Development Guide

Declaring Utility Procedures: _RC^TYPE
3-36
109759Distributed Systems Network Management (DSNM) Subsystem Interface
Development Guide
I Process Development Process
Declaring Private Thread Events: _PRIVATE^THREAD^EVENT
_PRIVATE^THREAD^EVENT declares events, the values of which are different from
any frame-generated event values, with meanings private to the thread.
num is a number in the range 0 through 7.
For example:
LITERAL next^object = _PRIVATE^THREAD^EVENT (0);
LITERAL sub^object = _PRIVATE^THREAD^EVENT (1);
CALL _SIGNAL^EVENT (sub^object + next^object);
RETURN _RC^WAIT;
.
! After the next dispatch ...
.
IF _ALLON (_LAST^EVENTS, sub^object + next^object)
THEN ...;
Simulating Frame-Generated Events
You may simulate any frame event by signaling it with _SIGNAL^EVENT. For
example:
CALL _SIGNAL^EVENT (_EV^IODONE);
Declaring Utility Procedures: _RC^TYPE
Thread procedures may call utility procedures, which are not themselves thread
procedures. It may be useful for such a procedure to return a valid frame return code as
a function value. Use _RC^TYPE to declare:
Function procedures that can be called by a thread procedure (but which are not
themselves thread procedures) and that return a frame return code value.
Variables to hold the frame return code (_RC^) values returned by _RC^TYPE
function procedures.
A special return code, _RC^NULL, may be returned by an _RC^TYPE procedure to
indicate that it has not returned any valid frame return code. _RC^NULL must not be
returned to the frame.
_PRIVATE^THREAD^EVENT ( num );
Note. When you simulate a frame event, be careful not to use control variables set by frame-
generated events (such as _LAST^CI^ID or _LAST^TIMEOUT^TAG), unless they are set to
match the event simulated.
_RC^TYPE PROC procname ; |
_RC^TYPE var1 ,[ var2 [,...]];