Previous Topic Next topic Print topic


CBL_EVENT_WAIT

Waits for the event to be posted.
Note: This routine is not supported in JVM COBOL.

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 or pic x(8) comp-5 (64-bit native programs only).

On Entry:

event-handle
The event handle.
nowait-flag
A value 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
Remaining bits
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.

Previous Topic Next topic Print topic