Creates a monitor synchronization object for thread synchronization within one process.
Syntax:
call "CBL_MONITOR_OPEN_INTRA" using by reference monitor-handle
by value open-flags
Parameters
|
Using call prototype (see
Key)
|
Picture
|
monitor-handle
|
cblt-pointer
|
usage pointer.
|
open-flags
|
cblt-os-flags
|
pic x(4) comp-5
or
pic x(8) comp-5 (64-bit native programs only)
|
On Entry:
-
open-flags
- A value indicating the priority algorithm used to grant locks:
- Bit 0
-
0
|
Readers and writers have interleaved priority; that is, if a write request is issued, any further read requests will block until the first write request is granted and finished
|
1
|
Read requests always have priority, possibly leading to writer starvation.
|
- Remaining bits
- Reserved and should be set to zero.
Comments:
If open-flags bit 0 is set to 0, and nested read locks are requested, then single thread deadlock is possible.