STREAMS-UX Programmer's Guide (February 2007)

STREAMS Utilities Supported by HP-UX
Appendix B
156
NAME
bcanputnext () – Checks for the existence of flow control in the queue for the specified priority band.
SYNOPSIS
#include <sys/stream.h>
int bcanputnext (queue_t *q, int pri);
ARGUMENTS
q
Pointer to the queue.
pri
Priority band for which the flow control check is requested.
DESCRIPTION
bcanputnext() routine tests if there is room left in the queue (q->q_next) for the band specified in
pri
. If
the queue does not have service procedure, then it finds the queue that contains service procedure in the
direction of message flow and tests to see if a message priority can be enqueued. But, if such a queue cannot
be found, then it stops at the end of the stream.
If 0 is specified in
pri
, then bcanputnext() is equivalent to canputnext().
RETURN VALUES
Returns 1 if the message can be enqueued. If the message queue for the specified band is full, 0 is returned
and QB_WANTW is set in the queue that has the service procedure to automatically back-enable the queue.
CONSTRAINTS
bcanputnext() can be called from thread or interrupt context. Only spinlocks of STREAMS/UX user lock
orders can be held across this call.