'\" te .\" Copyright 1989 AT&T .\" Copyright (c) 2006, Sun Microsystems, Inc., All Rights Reserved .TH putctl1 9F "16 Jan 2006" "SunOS 5.11" "Kernel Functions for Drivers" .SH NAME putctl1 \- send a control message with a one-byte parameter to a queue .SH SYNOPSIS .LP .nf #include \fBint\fR \fBputctl1\fR(\fBqueue_t *\fR\fIq\fR, \fBint\fR \fItype\fR, \fBint\fR \fIp\fR); .fi .SH INTERFACE LEVEL .sp .LP Architecture independent level 1 (DDI/DKI). .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIq\fR\fR .ad .RS 8n .rt Queue to which the message is to be sent. .RE .sp .ne 2 .mk .na \fB\fItype\fR\fR .ad .RS 8n .rt Type of message. .RE .sp .ne 2 .mk .na \fB\fIp\fR\fR .ad .RS 8n .rt One-byte parameter. .RE .SH DESCRIPTION .sp .LP The \fBputctl1()\fR function, like \fBputctl\fR(9F), tests the \fItype\fR argument to make sure a data type has not been specified, and attempts to allocate a message block. The \fIp\fR parameter can be used, for example, to specify how long the delay will be when an \fBM_DELAY\fR message is being sent. \fBputctl1()\fR fails if \fItype\fR is \fBM_DATA\fR, \fBM_PROTO\fR, or \fBM_PCPROTO\fR, or if a message block cannot be allocated. If successful, \fBputctl1()\fR calls the \fBput\fR(9E) routine of the queue pointed to by \fIq\fR with the newly allocated and initialized message. .SH RETURN VALUES .sp .LP On success, \fB1\fR is returned. \fB0\fR is returned if \fItype\fR is a data type, or if a message block cannot be allocated. .SH CONTEXT .sp .LP The \fBputctl1()\fR function can be called from user, interrupt, or kernel context. .SH EXAMPLES .sp .LP See the \fBputctl\fR(9F) function page for an example of \fBputctl1()\fR. .SH SEE ALSO .sp .LP \fBput\fR(9E), \fBallocb\fR(9F), \fBdatamsg\fR(9F), \fBputctl\fR(9F), \fBputnextctl1\fR(9F) .sp .LP \fIWriting Device Drivers for Oracle Solaris 11.2\fR .sp .LP \fISTREAMS Programming Guide\fR