.TH putq() "" "" "DDI/DKI Kernel Routine"
.PC "Put a message onto a queue"
.B "#include <sys/stream.h>"
\fBint putq(\fIqueue\^\fB, \fImessage\^\fB)\fR
\fBqueue_t *\fIqueue\^\fB; mblk_t *\fImessage\^\fB;\fR
.PP
.B putq()
puts
.I message
onto
.I queue
after its
.B put
routine has finished processing it.
.PP
.B putq()
places
.I message
onto
.I queue
after all other messages with the same priority.
It updates all flow-control parameters, and schedules
.IR queue 's
service routine if it had not been disabled by a previous call to
.BR noenable() .
.PP
If all goes well
.B putq()
returns one; otherwise, it returns zero.
.SH "See Also"
.B
DDI/DKI kernel routines,
getq(),
insq(),
msgb,
putbq(),
queue,
rmvq()
.R
.SH Notes
.B putq()
has base or interrupt level.
It does not sleep.
.PP
A driver can hold a
driver-defined basic lock, read/write lock, or sleep lock
across a call to this function.
.PP
The caller cannot have the stream frozen when it calls this function.
.PP
.B putq()
fails if not enough memory is available to allocate the accounting data
structures used with messages with priority greater than zero.
