Buffered I/O buffers, allocating
The operating system includes a cache of buffers
that are used for block I/O transfers.
The header structure for these buffers is described on the
buf(D4)
manual page.
See
``Memory allocation''
for information about allocating memory
other than buffer cache buffers in a driver.
DDI functions
The following DDI structures are used
for buffered I/O operations:
buf(D4)-
Buffer header structure.
bcb(D4)-
Breakup control block.
The following DDI functions are used
to allocate buffer headers:
bcb_alloc(D3)-
Allocate a breakup control block
bcb_prep(D3)-
Prepare an allocated breakup control block
bcb_free(D3)-
Free a breakup control block
biodone(D3)-
Release buffer and unblock processes
after a block I/O operation is complete.
bioerror(D3)-
Manipulate error fields within a
buf(D4)
structure.
biowait(D3)-
Suspend execution pending completion
of a block I/O operation.
biowait_sig(D3)-
Suspend execution pending completion
of a block I/O operation
or a signal.
brelse(D3)-
Release buffer
buf_breakup(D3)-
buffer breakup routine
clrbuf(D3)-
Clear buffer contents
freerbuf(D3)-
Release buffer from getrbuf
geteblk(D3)-
Allocate 1024 byte buffer, return pointer
geterror(D3)-
Return buffer error number
getrbuf(D3)-
Allocate buffer header only
ngeteblk(D3)-
Allocate n-byte buffer, return pointer
ODDI functions
The following ODDI functions are used
to allocate buffer headers:
brelse(D3oddi)-
Release buffer.
disksort(D3oddi)-
Add a block I/O request to a device's queue.
geteblk(D3oddi)-
Get a free buffer from the block buffer pool.
iodone(D3oddi)-
Release buffer and unblock processes
after a block I/O operation is complete.
iowait(D3oddi)-
Suspend execution pending completion
of a block I/O operation.
pio_breakup(D3oddi)-
Break up a programmed I/O request.
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005