Guardian Procedure Calls Reference Manual

USEREVENT_WAIT_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Returned Value
Considerations
Summary
The USEREVENT_WAIT_ procedure waits for one or more of 31 application-defined user events
to occur within a specified time. USEREVENT_WAIT_ is used by applications that want to use user
events to coordinate their internal operations but does not mix these wait operations with the
common wait and I/O completion procedures.
USEREVENT_WAIT_ has two parameters: waitMask and timeout. The waitMask parameter
sets a bit mask of application-defined user events. If any event in the waitMask is already pending
in this process, the procedure returns immediately. The timeout parameter specifies the time, in
microseconds, to wait for the user event. If timeout is a negative value, the call will never time
out. If timeout is 0, the call only checks for events and does not wait. If timeout is a positive
value, the specified value is effectively rounded up to the resolution supported by the operating
system for interval times, which is in the order of milliseconds, not microseconds.
If multiple user events are set, the returned value identifies the highest-priority event of interest. The
reported event is removed from the process’ pending user event set. To get the rest of the events
that may be pending, USEREVENT_WAIT_ must be invoked iteratively, with the appropriate event
mask.
NOTE: The USEREVENT_WAIT_ procedure is supported on systems running H06.27 and later
H-series RVUs and J06.16 and later J-series RVUs.
Syntax for C Programmers
#include <cextdecs(USEREVENT_WAIT_)>
uint32 USEREVENT_WAIT_ ( uint32 waitMask
,int64 timeout );
Syntax for TAL Programmers
event := USEREVENT_WAIT_ ( waitMask ! i
,timeout ); ! i
Parameters
waitMask
input
UINT(32)
specifies an event mask of application-defined user events to wait on. This mask is a bit mask
of events. The higher-order bit has the higher priority. The units bit is reserved and ignored.
The waitMask parameter is similar to the waitMask parameter of USEREVENT_SET_, but it
applies just to this call.
USEREVENT_WAIT_ Procedure 1471