.TH putctl() "" "" "DDI/DKI Kernel Routine"
.PC "Put a control message onto a queue"
.B "#include <sys/stream.h>"
\fBint putctl(\fIqueue\^\fB, \fItype\^\fB)\fR
\fBqueue_t *\fIqueue\^\fB; int \fItype\^\fB;\fR
.PP
.B putctl()
allocates a message block and calls the driver's
.B put
to put it onto
.IR queue .
.I type
is the type of the message to be created; it must not be a data type, i.e.,
.BR M_DATA ,
.BR M_PROTO ,
or
.BR M_PCPROTO .
.PP
.B putctl()
returns one if it could allocate and put the the message block.
It fails and returns zero if
.I type
is a data type, or if it cannot allocate a message block.
.SH "See Also"
.B
DDI/DKI kernel routines,
put(),
putctl1(),
putnextctl(),
putnextctl1(),
queue
.R
.SH Notes
.B putctl()
has base or interrupt type.
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
.I queue
cannot reference field
.BR q_next .
Rather, use the function
.B putnextctl() .
