.TH canputnext() "" "" "DDI/DKI Kernel Routine"
.PC "Test whether a queue has room for a message"
.B "#include <sys/stream.h>"
\fBint bcanputnext(\fIqueue\^\fB)\fR
\fBqueue_t *\fIqueue\^\fB;\fR
.PP
.B canputnext()
tests whether a queue has room for a message.
.PP
.B canputnext
searches
.I queue
beginning at
.B canputnext()
until it finds a queue that has a service routine.
If finds one, it tests whether that queue has room for a message.
If the queue is full,
.B canputnext()
marks the queue so that the caller's service routine is
back-enable automatically when the amount of data in the queue
reaches its low-water mark.
.PP
.B canputnext()
returns one if a message can be sent in the stream, or
if it reaches the end of the stream without find a queue that contains a
service routine.
It returns zero if the queue with a service routine does not have room for
a message.
.SH "See Also"
.B
bcanput(),
bcanputnext(),
canput(),
DDI/DKI kernel routines,
putbq(),
putnext(),
queue
.R
.SH Notes
.B canputnext()
has base or interrupt level.
It does not sleep.
.PP
A function can hold
driver-defined basic locks, read/write locks, and sleep locks
across a call to this function.
.PP
Note that
.B canputnext()
can indicate that
.I queue
has room for a message, but another message can fill
.I queue
before your process enqueues its message.
.PP
You cannot have the stream frozen when you call this function.
