Rocket® Enterprise Developer (formerly a product of Micro Focus or formerly a product of Open Text) documentation, created before Rocket Software acquired certain products from OpenText, may include outdated references to "Micro Focus" or "OpenText", both of which are trademarks of OpenText or its affiliates. Rocket Software is not affiliated with Micro Focus or OpenText and has since rebranded these products as Rocket® products. You may also encounter outdated links in this documentation. If you do, please contact Rocket Support (support@rocketsoftware.com) for assistance.
CBL_MUTEX_ACQUIRE
Acquires a mutex for the specified thread.
Syntax:
call "CBL_MUTEX_ACQUIRE" using by value mutex-handle
by value nowait-flag
Parameters:
| Using call prototype (see Key) | Picture | |
|---|---|---|
| mutex-handle | cblt-pointer. | usage pointer. |
| nowait-flag | cblt-os-flags. | pic x(4) comp-5
or pic x(8) comp-5 (64-bit native programs only) |
On Entry:
- mutex-handle
- Mutex handle
- nowait-flag
- A number that determines what happens if the mutex cannot be acquired immediately:
- Bit 0
-
0 The routine blocks the thread/process until the mutex can be acquired . 1 The routine returns immediately with a non-zero return 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:
Behavior is undefined if mutex-handle is invalid.