Open System Services System Calls Reference Manual (G06.28+, H06.05+)
SPT_READX(2) OSS System Calls Reference Manual
Waited SPT_READX( )
If a waited SPT_READX() call is executed, the count_read parameter
indicates the number of bytes actually read.
Nowait SPT_READX()
If a nowait SPT_READX( ) call is executed, count_read has no meaning
and can be omitted. The count of the number of bytes read is obtained
through the count-transferred parameter of the Guardian AWAITIOX
procedure when the I/O operation completes.
The SPT_READX() function must complete with a call to the Guardian
AWAITIOX procedure when it is used with a file that is opened for
nowait I/O.
It is possible to initiate concurrent nowait read operations that share the
same data buffer. To do this successfully with files opened by
SPT_FILE_OPEN_(), you must use SPT_SETMODE() function 72 to
cause the system to use an intermediate buffer in the process file seg-
ment (PFS) for I/O transfers.
SPT_READX( ) call when default locking mode is in effect
If the default locking mode is in effect when a call to SPT_READX( ) is
made to a locked file, but the filenum of the locked file differs from the
filenum in the call, the caller of SPT_READX() is suspended and
queued in the locking queue behind other processes attempting to lock or
read the file or record.
A deadlock condition occurs if a call to SPT_READX() is made by a
process having multiple opens on the same file and the filenum used to
lock the file differs from the filenum supplied to SPT_READX().
Read call when alternate locking mode is in effect
If the alternate locking mode is in effect when SPT_READX() is called,
and the file or record is locked through a Guardian file number other than
that supplied in the call, the call is rejected with Guardian file-system
error 73 (file is locked).
Locking mode for read
The locking mode is specified by SPT_SETMODE() function 4. If you
encounter Guardian file-system error 73 (file is locked), you do not
need to call SPT_SETMODE() for every call to SPT_READX( ).
SPT_SETMODE()) stays in effect indefinitely (for example, until
another SPT_SETMODE() call is performed or the file is closed), and
no additional overhead is involved.
Location of buffer and count_read
The buffer and count transferred can be in the user stack or in an
extended data segment. The buffer and count_read cannot be in the user
code space.
If the buffer and count_read are in a selectable extended data segment,
the segment must be in use at the time of the call. Flat segments allo-
cated by a process are always accessible to the process.
7−258 Hewlett-Packard Company 527186-007