CBL_SEMAPHORE_RELEASE

Releases one of the resources represented by the semaphore by incrementing the associated count.

Syntax:
call "CBL_SEMAPHORE_RELEASE" using by value semaphore-handle
Parameters:
Using call prototype (see Library Routines - Key) Picture (32-bit systems)
semaphore-handle cblt-pointer usage pointer.
On Entry:
semaphore-handle Semaphore handle.
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 count was zero before the increment, and some other threads are blocked in a CBL_SEMAPHORE_ACQUIRE call waiting for the count to become non-zero, then one of those threads is released, so it can decrement the count and return from CBL_SEMAPHORE_ACQUIRE.

Behavior is undefined if semaphore-handle is invalid.

See Also: