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 OTHERQ 9F "Jan 16, 2006"
9 OTHERQ, otherq \- get pointer to queue's partner queue
13 #include <sys/stream.h>
18 \fBqueue_t *\fR\fBOTHERQ\fR(\fBqueue_t *\fR\fIq\fR);
24 Architecture independent level 1 (DDI/DKI).
38 The \fBOTHERQ()\fR function returns a pointer to the other of the two
39 \fBqueue\fR structures that make up a STREAMS module or driver. If \fIq\fR
40 points to the read queue the write queue will be returned, and vice versa.
44 The \fBOTHERQ()\fR function returns a pointer to a queue's partner.
48 The \fBOTHERQ()\fR function can be called from user, interrupt, or kernel
52 \fBExample 1 \fRSetting Queues
55 This routine sets the minimum packet size, the maximum packet size, the high
56 water mark, and the low water mark for the read and write queues of a given
57 module or driver. It is passed either one of the queues. This could be used if
58 a module or driver wished to update its queue parameters dynamically.
64 2 set_q_params(q, min, max, hi, lo)
75 13 OTHERQ(q)->q_minpsz = min;
76 14 OTHERQ(q)->q_maxpsz = max;
77 15 OTHERQ(q)->q_hiwat = hi;
78 16 OTHERQ(q)->q_lowat = lo;
86 \fIWriting Device Drivers\fR
89 \fISTREAMS Programming Guide\fR