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 le 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 les opened by
SPT_FILE_OPEN_(), you must use SPT_SETMODE() function 72 to
cause the system to use an intermediate buffer in the process le 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 le, but the lenum of the locked le differs from the
lenum 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 le or record.
A deadlock condition occurs if a call to SPT_READX() is made by a
process having multiple opens on the same le and the lenum used to
lock the le differs from the lenum 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 le or record is locked through a Guardian le number other than
that supplied in the call, the call is rejected with Guardian le-system
error 73 (file is locked).
Locking mode for read
The locking mode is specied by SPT_SETMODE() function 4. If you
encounter Guardian le-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 indenitely (for example, until
another SPT_SETMODE() call is performed or the le 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.
7258 Hewlett-Packard Company 527186-007