clrbuf(D3DK) —
.IX \f4clrbuf\fP(D3DK)
NAME
clrbuf − erase the contents of a buffer
SYNOPSIS
#include <sys/types.h>
#include <sys/buf.h>
void clrbuf(buf_t ∗bp);
ARGUMENTS
bpPointer to the buffer header structure.
DESCRIPTION
The clrbuf function zeros a buffer and sets the b_resid member of the buf(D4DK) 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.
If the buffer has the B_PAGEIO 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(D3DK). .IX \f4buf\fP(D4DK)
RETURN VALUE
None.
LEVEL
Base or Interrupt.
NOTES
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks may be held across calls to this function.
SEE ALSO
bp_mapin(D3DK), buf(D4DK)
DDI/DKI