Open System Services System Calls Reference Manual (G06.28+, H06.05+)

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 le can create a deadlock. Locks are granted on an
open le (that is, le number) basis. Therefore, if a process opens the same le
multiple times, a lock of one le number excludes access to the le through other
le 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 le. This
determination includes opens by all processes. The specic limit for a le
depends on the les device type:
Disk files Cannot exceed 32,767 opens per disk.
Process Dened by the process (see the discussion of controlling openers
in the Guardian Programmers 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 le numbers (even if for the same le) 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 le 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 lenum parameter returned by SPT_FILE_OPEN_() is valid; however, you
cannot initiate any I/O operation on the le 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
undened. If an error returns from AWAITIOX, it is your responsibility to close
the le.
For the TMF transaction pseudole, or for a waited le (nowait_depth =0
[zero]), a request for a nowait open is rejected.
The Guardian le system implementation of a nowait open might use waited
calls in some cases. However, it is guaranteed that the open message is sent
7144 Hewlett-Packard Company 527186-007