Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

SPT_FILE_OPEN_(2) OSS System Calls Reference Manual
Are independent
Might arrive in either order at the destination
Might complete in either order
Multiple opens on a given file can create a deadlock. Locks are granted on an
open file (that is, file number) basis. Therefore, if a process opens the same file
multiple times, a lock of one file number excludes access to the file through other
file numbers. The process is suspended forever if the default locking mode is in
effect and a deadlock occurs.
Limit on number of concurrent opens
There is a limit on the total number of concurrent opens permitted on a file. This
determination includes opens by all processes. The specific limit for a file
depends on the files device type:
Disk files Cannot exceed 32,767 opens per disk.
Process Defined by the process (see the discussion of controlling openers
in the Guardian Programmer’s Guide).
$0 Unlimited opens.
$0.#ZSPI 128 concurrent opens permitted.
$OSP Ten times the number of subdevices (up to a maximum of 830
opens).
$RECEIVE One open per process is permitted.
Other Varies by subsystem.
Specifying a nowait_depth value greater than 0 (zero) causes all I/O operations
to be performed in a nowait manner. Nowait I/O operations must be completed
by a call to the AWAITIOX procedure.
Nowait I/O operations on different file numbers (even if for the same file) are
independent, might arrive in any order at the destination, and might be com-
pleted by AWAITIOX in any order.
Nowait opens If you open a file in a nowait manner (options bit 1 = 1) and if
SPT_FILE_OPEN_() returns no error (returns a value of 0 [zero]), the open
operation must be completed by a call to AWAITIOX.
If there is an error, no system message is sent to the object being opened and you
do not need to call AWAITIOX to complete the operation. If there is no error,
the filenum parameter returned by SPT_FILE_OPEN_() is valid; however, you
cannot initiate any I/O operation on the file until you complete the open by cal-
ling AWAITIOX.
If you specify the tag parameter in the call to AWAITIOX, a -30D is returned;
the values returned in the buffer and count parameters to AWAITIOX are
undefined. If an error returns from AWAITIOX, it is your responsibility to close
the file.
For the TMF transaction pseudofile, or for a waited file (nowait_depth =0
[zero]), a request for a nowait open is rejected.
The Guardian file system implementation of a nowait open might use waited
calls in some cases. However, it is guaranteed that the open message is sent
7196 Hewlett-Packard Company 527186-023