2 .\" Copyright 1989 AT&T
3 .\" Copyright (c) 2006, Sun Microsystems, Inc., All Rights Reserved
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH PUTQ 9F "Jan 16, 2006"
9 putq \- put a message on a queue
13 #include <sys/stream.h>
17 \fBint\fR \fBputq\fR(\fBqueue_t *\fR\fIq\fR, \fBmblk_t *\fR\fIbp\fR);
23 Architecture independent level 1 (DDI/DKI).
31 Pointer to the queue to which the message is to be added.
40 Message to be put on the queue.
46 The \fBputq()\fR function is used to put messages on a driver's queue after the
47 module's put routine has finished processing the message. The message is placed
48 after any other messages of the same priority, and flow control parameters are
49 updated. If \fBQNOENB\fR is not set, the service routine is enabled. If no
50 other processing is done, \fBputq()\fR can be used as the module's put routine.
54 The \fBputq()\fR function returns \fB1\fR on success and \fB0\fR on failure.
57 Upon failure, the caller should call \fBfreemsg\fR(9F) to free the pointer to
62 The \fBputq()\fR function can be called from user, interrupt, or kernel
67 See the \fBdatamsg\fR(9F) function page for an example of \fBputq()\fR.
71 \fBdatamsg\fR(9F), \fBputbq\fR(9F), \fBqenable\fR(9F), \fBrmvq\fR(9F)
74 \fIWriting Device Drivers\fR
77 \fISTREAMS Programming Guide\fR