bioreset(D3) bioreset(D3)
NAME
bioreset - reset a private buffer for reuse after completed
I/O
SYNOPSIS
#include <sys/buf.h>
#include <sys/ddi.h>
void bioreset(buf_t *bp);
Arguments
bp Pointer to the buffer header structure.
DESCRIPTION
The bioreset function is called by drivers which have
allocated a private buffer for block I/O (via getrbuf(D3), for
example) and want to use the buffer multiple times. When
called, bioreset resets the buffer header pointed to by bp as
follows:
clears the B_DONE and B_ERROR flags set for the previous
I/O operation in the b_flags member
clears error codes (if any) returned for the previous
I/O operation in the b_error member
Return Values
None
USAGE
To reuse a buffer, the driver calls bioreset at the end of
each I/O operation to reset the buffer's header structure.
The reset prepares the buffer for reuse during the next I/O
operation. bioreset may also be called prior to performing
any I/O operation, although this is not required.
The calling driver must ``own'' the buffer for which the reset
is being requested.
I/O must not be in progress when bioreset is called.
Level
Initialization or Base.
Synchronization Constraints
Does not sleep.
Copyright 1994 Novell, Inc. Page 1
bioreset(D3) bioreset(D3)
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
REFERENCES
buf(D4), freerbuf(D3) getrbuf(D3)
NOTICES
Portability
All processors
Applicability
ddi: 4, 5, 5mp, 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 2