'\"macro stdmacro
.if n .pH ddi_dki.putbq @(#)putbq	40.6 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} putbq D3DK "STREAMS" "DDI/DKI" "\&"
.if \nX=1 .ds x} putbq D3DK "STREAMS" "DDI/DKI"
.if \nX=2 .ds x} putbq D3DK "" "\&"
.if \nX=3 .ds x} putbq "" "" "\&"
.TH \*(x}
.IX "\f4putbq\fP(D3DK)"
.SH NAME
\f4putbq\f1 \- place a message at the head of a queue
.SH SYNOPSIS
.nf
.na
\f4#include <sys/stream.h>
.sp 0.5
int putbq(queue_t *\f2q, \f4mblk_t *\f2bp\f4);\f1
.ad
.fi
.SH ARGUMENTS
.RS 0n 10
.IP "\f2q\f1" 10n
Pointer to the queue.
.IP "\f2bp\f1" 10n
Pointer to the message block.
.RE
.SH DESCRIPTION
\f4putbq\f1 places a message at the 
beginning of the appropriate section
of the message queue.
There are always sections for high priority and ordinary
messages.
If other priority bands are used, each will have its own section
of the queue, in priority band order, after high priority
messages and before ordinary messages.
\f4putbq\f1 can be used only for ordinary and priority band
messages.
High priority messages are not subject to flow control, and so
cannot be put back on the queue.
.P
This function is usually 
called when \f4bcanput\f1(D3DK) or \f4canput\f1(D3DK) determines that the
message cannot be passed on to the next stream component.
The flow control parameters are updated to reflect
the change in the queue's status.
If \f4QNOENB\f1 is not set, the service routine is enabled.
.SH RETURN VALUE
\f4putbq\f1 returns \f41\f1 on success and \f40\f1 on failure.
.SH LEVEL
Base or Interrupt
.SH SEE ALSO
\f2BCI Driver Development Guide\f1, Chapter 7, ``STREAMS''
.P
\f2STREAMS Programmer's Guide\f1, Chapter 5, ``Messages''
.P
.na
\f4bcanput\f1(D3DK),
\f4canput\f1(D3DK),
\f4getq\f1(D3DK),
\f4putq\f1(D3DK)
.ad
.SH EXAMPLE
See the \f4bufcall\f1(D3DK) function page for an example of \f4putbq\f1.
