STREAMS-UX Programmer's Guide (February 2007)
STREAMS Utilities Supported by HP-UX
Appendix B
193
NAME
putbq () – Places a message back at the head of a queue.
SYNOPSIS
#include <sys/stream.h>
int putbq (queue_t *q, mblk_t *mp);
PARAMETERS
q
Pointer to the queue.
mp
Pointer to the message.
DESCRIPTION
This function places the specified message at its assigned priority as close to the head of the queue as
possible. It is normally called by the service procedure for the queue, and is invoked when a canput() or
bcanput() call from the service procedure detects a flow control condition. All flow control parameters for the
queue are updated. Note that high priority messages should not be placed back on a queue. They should be
processed in spite of flow control.
RETURN VALUES
putbq() returns a 1 on success and a 0 on failure.
CONSTRAINTS
putbq() can be called from thread or interrupt context. Only spinlocks of STREAMS/UX user lock order can
be held across this call.