.TH testb() "" "" "DDI/DKI Kernel Routine"
.PC "Check for an available buffer"
.B "#include <sys/stream.h>"
\fBint testb(\fIsize\^\fB, \fIpriority\^\fB)\fR
\fBint \fIsize\^\fB, \fIpriority\^\fB;\fR
.PP
.B testb()
checks whether a call to
.B allocb()
call is likely to succeed.
.I size
and
.I priority
give, respectively, the size and the priority of the proposed allocation.
.B testb()
returns one if the proposed call is likely to succeed, and zero if it is not.
.SH "See Also"
.B
allocb(),
bufcall(),
DDI/DKI kernel routines
.R
.SH Notes
.B testb()
has base or interrupt level.
It does not sleep.
.PP
A driver can hold a
driver-defined basic lock, read/write lock, or sleep lock
across a call to this function.
.PP
This function is provided purely as a porting convenience for developers.
You should replace
calls to this function with calls to functions that do the real work.
