DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

clrbuf(D3)


clrbuf -- erase the contents of a buffer

Synopsis

   #include <sys/types.h>
   #include <sys/buf.h>
   #include <sys/ddi.h>
   

void clrbuf(buf_t *bp);

Description

The clrbuf function zeros a buffer and sets the b_resid member of the buf(D4) structure to 0. Zeros are placed in the buffer starting at the address specified by b_un.b_addr for a length of b_bcount bytes.

Arguments


bp
Pointer to the buffer header structure.

Return values

None

Usage

If the buffer has the B_PAGEIO or the B_PHYS flag set in the ``b_flags'' field, then clrbuf should not be called until the proper virtual space has been allocated by a call to bp_mapin(D3).

Context and synchronization

Non-blockable, interrupt, user, or blockable context.

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

SCO OpenServer ODDI compatibility

clrbuf(D3oddi) is the ODDI equivalent of this function. Note that ODDI drivers must call the geteblk(D3oddi) function to allocate the buffer before calling clrbuf( ).

References

bp_mapin(D3), buf(D4)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005