74 lines
1.8 KiB
Plaintext
74 lines
1.8 KiB
Plaintext
.if n .pH ddi.rm/d3/gen/putbq @(#)putbq 43.12 of 12/9/92
|
|
.\" Copyright 1992, 1991 UNIX System Laboratories, Inc.
|
|
.TH putbq D3
|
|
.IX "\f4putbq\fP(D3)"
|
|
.SH NAME
|
|
\f4putbq\f1 \- place a message at the head of a queue
|
|
.SH SYNOPSIS
|
|
.nf
|
|
.na
|
|
.ft 4
|
|
#include <sys/stream.h>
|
|
#include <sys/ddi.h>
|
|
.sp 0.4
|
|
int putbq(queue_t *\f2q\fP, mblk_t *\f2bp\fP);
|
|
.ft 1
|
|
.ad
|
|
.fi
|
|
.SS Arguments
|
|
.RS 0
|
|
.IP "\f2q\f1" 10n
|
|
Pointer to the queue.
|
|
.IP "\f2bp\f1" 10n
|
|
Pointer to the message.
|
|
.RE
|
|
.SH DESCRIPTION
|
|
\f4putbq\f1 puts a message back at the head of a queue.
|
|
If messages of a higher priority are on the queue, then
|
|
\f2bp\fP is placed at the head of its corresponding priority
|
|
band.
|
|
See \f4srv\fP(D2) for more information about message
|
|
priorities.
|
|
.P
|
|
All flow control parameters are updated.
|
|
The queue's service routine is scheduled
|
|
if it has not been disabled by a previous call to \f4noenable\fP(D3).
|
|
.P
|
|
.SS "Return Values"
|
|
\f4putbq\f1 returns 1 on success and 0 on failure.
|
|
.SH USAGE
|
|
\f4putbq\f1 is usually called when
|
|
\f4bcanput\f1(D3) or \f4canput\f1(D3)
|
|
determines that the message cannot be passed on to the next stream component.
|
|
.P
|
|
\f4putbq\fP can fail if there is not enough memory
|
|
to allocate the accounting data structures used with messages
|
|
whose priority bands are greater than zero.
|
|
.P
|
|
High priority messages should never be put back on a queue
|
|
from within a service routine.
|
|
.SS Level
|
|
Base or Interrupt.
|
|
.SS "Synchronization Constraints"
|
|
Does not sleep.
|
|
.P
|
|
Driver-defined basic locks, read/write locks, and sleep locks
|
|
may be held across calls to this function.
|
|
.P
|
|
.SS Examples
|
|
See \f4bufcall\f1(D3) for an example of \f4putbq\f1.
|
|
.SH REFERENCES
|
|
.na
|
|
\f4bcanput\fP(D3),
|
|
\f4canput\fP(D3),
|
|
\f4getq\fP(D3),
|
|
\f4insq\fP(D3),
|
|
\f4msgb\fP(D4),
|
|
\f4putq\fP(D3),
|
|
\f4queue\fP(D4),
|
|
\f4rmvq\fP(D3),
|
|
\f4srv\fP(D2)
|
|
.ad
|
|
.br
|
|
.ne 5
|