geteblk, getablk --
get a buffer from the block buffer pool
struct buf geteblk(void);
struct buf getablk(int flag);
function acquires a free buffer from the block
The pointer returned by this routine addresses a buffer
that can be used as required.
The buffer can subsequently be returned
to the buffer pool by calling
The getablk routine calls geteblk
directly. getablk is provided for compatibility only.
The flag argument to getablk is ignored.
These routines return a pointer to the allocated buffer.
geteblk sleeps until a buffer becomes available.
When a buffer is allocated
does the following:
B_BUSY and B_AGE.
to the same buffer pointer that is returned.
b_dev to NODEV.
b_bcount to SBUFSIZE.
The system buffer size, SBUFSIZE,
is defined in <sys/param.h>.
Context and synchronization
User or blockable
These routines protect internal critical sections
from interrupts at or lower than
1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp
SVR5 DDI compatibility
can be used in DDI drivers,
although note that the syntax is a bit different
and there are subtle differences
in how the allocated
header is populated.
function is supported for DDI 7 and earlier versions,
although there are still small differences
between the SCO OpenServer and SVR5 implementations.
is not supported for DDI drivers.
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005