clrbuf(D3)clrbuf(D3)NAMEclrbuf - erase the contents of a buffer
SYNOPSIS
#include <sys/types.h>
#include <sys/buf.h>
#include <sys/ddi.h>
void clrbuf(buf_t *bp);
Arguments
bp Pointer to the buffer header structure.
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.
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).
Level
Base or Interrupt.
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks may be held
across calls to this function.
REFERENCESbp_mapin(D3), buf(D4)
Page 1