dg_unbuffered_read(2) SDK R4.11 dg_unbuffered_read(2)
NAME
dgunbufferedread - synchronously read data from a file without
system buffering
SYNOPSIS
int dgunbufferedread (fildes, buffer, startblock, numblocks)
int fildes;
char buffer[];
unsigned startblock;
unsigned numblocks;
where:
fildes A valid descriptor
buffer User data buffer
startblock Starting logical block number
numblocks Size (in blocks) of the read
DESCRIPTION
The dgunbufferedread system call transfers numblocks blocks of
data from the file associated with fildes into the buffer pointed to
by buffer. The starting block number of the transfer is given by the
startblock parameter.
The file position attribute of fildes is ignored by this interface.
The starting block position of the read must be specified in the
call. The file position attribute of fildes remains unchanged by the
execution of this call.
If mandatory record locking is enabled for the file, this call will
fail.
ACCESS CONTROL
The fildes must have been opened for unbuffered I/O with the
O_DG_UNBUFFERED flag, and fildes must also have been opened for read
access.
RETURN VALUE
0..numblocks
Completed successfully. The number of blocks actually read is
returned. The value 0 indicates EOF (end-of-file).
-1 An error occurred. errno is set to indicate the error.
DIAGNOSTICS
Errno may be set to one of the following error codes:
EBADF fildes is not opened for unbuffered reading.
EFAULT buffer points outside the allocated address space.
EINTR A signal was caught during the system call.
SEE ALSO
open(2), dgunbufferedwrite(2).
Licensed material--property of copyright holder(s)