putbq(D3)

putbq - place a message at the head of a queue

As shipped in IRIX 6.5.19. Unchanged since IRIX 6.5.

NAME
     putbq - place a message at the head of a queue

SYNOPSIS
     #include <sys/stream.h>
     #include <sys/ddi.h>
     int putbq(queue_t *q, mblk_t *bp);

   Arguments
     q         Pointer to the queue.

     bp        Pointer to the message.

DESCRIPTION
     putbq puts a message back at the head of a queue.  If messages of a
     higher priority are on the queue, then bp is placed at the head of its
     corresponding priority band.  See srv(D2) for more information about
     message priorities.

     All flow control parameters are updated.  The queue's service routine is
     scheduled if it has not been disabled by a previous call to noenable(D3).

   Return Values
     putbq returns 1 on success and 0 on failure.

USAGE
     putbq is usually called when bcanput(D3) or canput(D3) determines that
     the message cannot be passed on to the next stream component.

     putbq can fail if there is not enough memory to allocate the accounting
     data structures used with messages whose priority bands are greater than
     zero.

     High priority messages should never be put back on a queue from within a
     service routine.

   Level
     Base or Interrupt.

   Synchronization Constraints
     Does not sleep.

     Driver-defined basic locks, read/write locks, and sleep locks may be held
     across calls to this function.

   Examples
     See bufcall(D3) for an example of putbq.
REFERENCES
     bcanput(D3), canput(D3), getq(D3), insq(D3), msgb(D4), putq(D3),
     queue(D4), rmvq(D3), srv(D2)