DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SCO OpenServer

geteblk(D3oddi)


geteblk, getablk -- get a buffer from the block buffer pool

Synopsis

struct buf *geteblk(void);

struct buf *getablk(int flag);

Description

The geteblk( ) function acquires a free buffer from the block buffer pool. 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 brelse(D3oddi) or iodone(D3oddi).

The getablk routine calls geteblk directly. getablk is provided for compatibility only.

Arguments

None. The flag argument to getablk is ignored.

Return values

These routines return a pointer to the allocated buffer.

geteblk sleeps until a buffer becomes available.

Usage

When a buffer is allocated geteblk( ) does the following:

Context and synchronization

User or blockable context.

These routines protect internal critical sections from interrupts at or lower than spl(D3oddi) level 6.

Hardware applicability

All

Version applicability

oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

SVR5 DDI compatibility

ngeteblk(D3) can be used in DDI drivers, although note that the syntax is a bit different and there are subtle differences in how the allocated buf(D4) header is populated. The geteblk(D3) function is supported for DDI 7 and earlier versions, although there are still small differences between the SCO OpenServer and SVR5 implementations.

getablk( ) is not supported for DDI drivers.

References

brelse(D3oddi), iodone(D3oddi), spl(D3oddi)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005