call "CBL_SEMAPHORE_ACQUIRE" using by value semaphore-handle by value flags [by value timeout]
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 |
Comments:
Behavior is undefined if semaphore-handle is invalid.