CBL_EVENT_WAIT

Syntax:

call "CBL_EVENT_WAIT" using by value event-handle
                      by value       nowait-flag

Parameters:

event-handle
Call prototype (see Key): cblt-pointer
Picture: usage pointer.
nowait-flag
Call prototype (see Key): cblt-os-flags
Picture: pic x(4) comp-5.

On Entry:

event-handle
The event handle.
nowait-flag
A 32-bit number that specifies the action to take if the event has not been posted:
Bit 0
0 The thread blocks until the event is posted, and then returns.
1 The call returns immediately with an error value
Bits 1-31
Reserved. Must be set to zero.

On Exit:

return-code
A value of 0 indicates that the call was successful. Any other value indicates an error. See RETURN-CODE Values For Synchronization Routines

Comments:

If the event is already posted, the call returns immediately.

Behavior is undefined if event-handle is invalid.