MPE/iX Intrinsics Reference Manual (32650-90875)
Chapter 7 377
Command Definitions (HP32208-HPLOACNMPROC)
HPFOPEN
The following values are valid:
0 Disallow dynamic locking/unlocking
1 Allow dynamic locking/unlocking
Default: 0
The process can continue this temporary locking/unlocking until it closes
the file. If several accessors are sharing the file, they must all specify, or
not specify, this option. For example, if a file is opened with the dynamic
locking option enabled, and a subsequent accessor tries to open the file
with dynamic locking disabled, that subsequent attempt to open fails.
Dynamic locking/unlocking is possible through the equivalent of a global
resource identification number (RIN) assigned to the file and temporarily
acquired by HPFOPEN.
Accessors that have opened a file with the dynamic locking option enabled
must access the file through the FLOCK and FUNLOCK intrinsics to gain
exclusive access to the file. Since the use of these intrinsics is
discretionary, however, all accessors must agree to use FLOCK and FUNLOCK
when writing to a file to guarantee exclusive access. File locking is advised,
but is not mandated by MPE/iX.
Lock access must be at the account, group, and file levels for HPFOPEN to
grant this option. (Lock access is available if lock, execute, append, or
write access is set at these levels.) This option is ignored for files not
residing on disk.
This
itemnum
may only be specified with the disallow dynamic locking
value (0) when used with directories.
(ASC) Not used for asynchronous devices.
13/I32 Exclusive:
Passes a value indicating continuous exclusive access to the file, from open
to close. Use this option when performing a critical operation (for example,
updating the file).
The following values are valid:
0If
itemnum
=11 specifies read only access, read-share
access takes effect. Otherwise, exclusive access takes
effect. Regardless of which access option was selected,
FFILEINFO reports zero. A zero (default) value for the
itemnum
specifies that if the access type is read, directory
read, or no access (
itemnum
11 equal to 0, 8, or 9) then
shared access takes effect; otherwise exclusive access
takes effect.
1 Exclusive access. After the file is opened, any additional
HPFOPEN/FOPEN requests for this file, whether issued by
this process or another process, are prohibited until this
process issues the FCLOSE request or terminates. If any