call "CBL_SEMAPHORE_ACQUIRE" using by value semaphore-handle
by value flags
[by value timeout]
| Using call prototype (see Key) | Picture | |
|---|---|---|
| semaphore-handle | cblt-pointer | usage pointer |
| flags | cblt-os-flags | pic x(4) comp-5
or pic x(8) comp-5 (64-bit native programs only) |
| timeout | pic x(4) comp-5 |
| 0 | Block the thread/process until the count is non-zero, then the count is decremented and the call returns. |
| 1 |
If no timeout is supplied (i.e. bit 1 = 0) then return immediately, no decrement If timeout supplied (i.e. bit 1=1 ) then block until count is non-zero or timeout duration has expired. If the timeout expires, return error code 1010 ("no resources available"), else decrement count and return |
| 0 | No timeout parameter supplied |
| 1 | Timeout parameter is supplied and used if bit 0=1 |
Comments:
Behavior is undefined if semaphore-handle is invalid.