MPE/iX Intrinsics Reference Manual (32650-90875)
220 Chapter5
Command Definitions (FCONTROL - FLOCK)
FLOCK
The following condition codes are possible when
lockflag
bit (15:1)=0:
CCE (2) Request granted.
CCG (0) Request denied. The file was locked by another process.
CCL (1) Request denied. This file was not opened with the dynamic locking
aoption
bit (10:1) specified in the FOPEN/HPFOPEN intrinsic, or there was
an attempt to lock more than one RIN and the calling process does not
have multiple RIN (MR) capability.
Operation Notes
On MPE/iX when a file is created (opened as a new file) with dynamic locking only one
accessor (the creator) is allowed. A subsequent call to FLOCK against such a file (although
unnessary) will succeed because the dynamic locking bit is not set to zero. On MPE V,
when a new file is created with dynamic locking the the dynamic locking bit is set to zero.
For this reason, a subsequent call to FLOCK will fail on MPE V.
Accessors that have opened a file with the dynamic locking option enabled must access the
file through the FLOCK intrinsic to gain exclusive access to the file. Since the use of this
intrinsic is discretionary, however, all accessors must agree to use FLOCK when writing to a
file to guarantee exclusive access. File locking is advised, but is not mandated by MPE/iX.
Related Information
Manuals Resource Management Programmer's Guide