'\"macro stdmacro
.if n .pH ddi_dki.OTHERQ @(#)OTHERQ	40.5 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} OTHERQ D3DK "STREAMS" "DDI/DKI" "\&"
.if \nX=1 .ds x} OTHERQ D3DK "STREAMS" "DDI/DKI"
.if \nX=2 .ds x} OTHERQ D3DK "" "\&"
.if \nX=3 .ds x} OTHERQ "" "" "\&"
.TH \*(x}
.IX "\f4OTHERQ\fP(D3DK)"
.SH NAME
\f4OTHERQ\f1 \- get pointer to queue's partner queue
.SH SYNOPSIS
.nf
.na
\f4#include <sys/stream.h>
#include <sys/ddi.h>
.sp 0.5
queue_t *OTHERQ(queue_t *\f2q\f4);\f1
.ad
.fi
.SH ARGUMENT
.RS 0n 10
.IP "\f2q\f1" 10n
Pointer to the queue.
.RE
.SH DESCRIPTION
The \f4OTHERQ\f1 function returns a pointer to the other of the
two \f4queue\f1 structures that make up a STREAMS module or
driver.  If \f2q\f1 points to the read queue the write queue will be
returned, and vice versa.
.SH RETURN VALUE
\f4OTHERQ\f1 returns a pointer to a queue's partner.
.SH LEVEL
Base or Interrupt
.SH SEE ALSO
\f2BCI Driver Development Guide\f1, Chapter 7, ``STREAMS''
.SH EXAMPLE
.IX "\f4OTHERQ\fP(D3DK), example"
This routine sets the minimum packet size, the maximum
packet size, the high water mark, and the low water mark
for the read and write queues of a given module or driver.
It is passed either one of the queues.  This could be used
if a module or driver wished to update its queue parameters
dynamically.
.ne 4
.P
.nf
.ft 4
.ps 7
 1  void
 2  set_q_params(q, min, max, hi, lo)
 3      queue_t *q;
 4      short min;
 5      short max;
 6      ushort hi;
 7      ushort lo;
 8  {
 9	q->q_minpsz = min;
10	q->q_maxpsz = max;
11	q->q_hiwat = hi;
12	q->q_lowat = lo;
13	OTHERQ(q)->q_minpsz = min;
14	OTHERQ(q)->q_maxpsz = max;
15	OTHERQ(q)->q_hiwat = hi;
16	OTHERQ(q)->q_lowat = lo;
17  }
.ps
.ft 1
.fi
.P
.FG "OTHERQ \- find partner queue"
