get an empty buffer
Synopsis (Not in current DDI version)
geteblk retrieves a buffer [see
from the buffer cache and returns a pointer to the
If a buffer is not
available, geteblk sleeps until one is available.
A pointer to the buffer header structure is
When the driver
routine receives a buffer header
from the kernel, all the necessary members are already initialized.
However, when a driver allocates buffers for its own use, it
must set up some of the members before
using the buffer for an I/O request.
The following list describes the state of these members
when the buffer header is received from geteblk:
is set for a synchronous write transfer
from main memory to the device.
The driver must turn on B_READ flag
to transfer from the device to main memor.
The driver may also turn on
the B_ASYNC flag
and set the
for a synchronous transfer.
the user's buffer.
is set to NODEV and must be initialized by the driver.
is set to 1024.
is set to the buffer's virtual address.
is not initialized by geteblk,
and must be
initialized by the driver
is set to BA_KVIRT
is set to bsize
is set to NULL
drivers do not allocate buffers.
A buffer is
allocated by the kernel,
and the associated buffer header is used as an
argument to the driver's
However, to implement some special features,
commands that perform I/O,
the driver may need its own buffer space.
The driver can get the buffer space from the system by
using geteblk or
If the driver chooses to use its own memory for the buffer,
it can allocate just a buffer header by using the
Buffers allocated via geteblk must be freed
Context and synchronization
User or blockable
1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp
Differences between versions
In DDI 8, use the
function instead of
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005