'\"macro stdmacro
.if n .pH ddi_dki.brelse @(#)brelse	40.6 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} brelse D3DK "" "DDI/DKI" "\&"
.if \nX=1 .ds x} brelse D3DK "" "DDI/DKI"
.if \nX=2 .ds x} brelse D3DK "" "\&"
.if \nX=3 .ds x} brelse "" "" "\&"
.TH \*(x}
.IX "\f4brelse\fP(D3DK)"
.SH NAME
\f4brelse\f1 \- return buffer to the \f4bfreelist\f1
.SH SYNOPSIS
.nf
.na
\f4#include <sys/types.h>
#include <sys/buf.h>
.sp 0.5
void brelse(\f4struct buf *\f2bp\f4);\f1
.ad
.fi
.SH ARGUMENT
.RS 0n 10
.IP "\f2*bp\f1" 10n
Pointer to the \f4buf\f1 structure.
.RE
.SH DESCRIPTION
The \f4brelse\f1 function returns a previously allocated buffer to the
buffer free list.  First, \f4brelse\f1 wakes up processes sleeping on
the buffer.  After the driver function is finished with the buffer,
\f4brelse\f1 returns the buffer header to a list of free buffers and
awakens any processes that called \f4sleep\f1(D3DK) to wait for a free
buffer on the \f4bfreelist\f1.
.SH "RETURN VALUE"
None, however, if \f4b_flags\f1 has \f4B_ERROR\f1 enabled due
to an error in an earlier I/O transfer, \f4b_flags\f1 is \s-1OR\s0ed with
\f4B_STALE\f1 and \f4B_AGE\f1, \f4B_ERROR\f1 and \f4B_DELWRI\f1 are
disabled, and \f4b_error\f1 is set to \f40\f1.
.SH LEVEL
Base or Interrupt
.SH SEE ALSO
\f2BCI Driver Development Guide\f1, Chapter 6, ``Input/Output Operations''
.P
.na
\f4clrbuf\f1(D3DK),
\f4biodone\f1(D3DK),
\f4biowait\f1(D3DK)
.ad
