Syntax:
call "CBL_SEMAPHORE_ACQUIRE" using by value semaphore-handle
by value nowait-flag
Parameters:
|
Using call prototype (see Key) |
Picture |
semaphore-handle
|
cblt-pointer |
usage pointer. |
nowait-flag
|
cblt-os-flags |
pic x(4) comp-5. |
On Entry:
-
semaphore-handle
- Semaphore handle.
-
nowait-flag
- A 32-bit value that determines the action of the routine if the count is zero:
- Bit 0
-
0 |
Block the thread/process until the count is non-zero, then the count is decremented and the call returns. |
1 |
Return immediately with a non-zero return-value, without decrementing the count. |
- Bits 1-31
- Reserved. Must be set to zero.
Comments:
Behavior is undefined if semaphore-handle is invalid.