SVR5 and SCO OpenServer 5
OTHERQ(D3str)
OTHERQ --
get a pointer to queue's partner queue
Synopsis
#include <sys/stream.h>
#include <sys/ddi.h>
queue_t *OTHERQ(queue_t *q);
Description
The OTHERQ function returns a pointer to the other of the
two queue structures that make up an instance of a STREAMS module or
driver.
Arguments
q-
Pointer to the queue.
Return values
OTHERQ returns a pointer to a queue's partner.
Usage
Context
Base or Interrupt.
Synchronization constraints
Does not block.
Multithreaded drivers may hold
driver-defined basic locks, read/write locks, and sleep locks
across calls to this function.
Hardware applicability
All
Version applicability
ddi:
1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
oddi:
1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp
References
RD(D3str),
WR(D3str)
Examples
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.
1 void
2 set_q_params(queue_t *q, long min, long max, ulong_t hi, ulong_t lo)
3 {
4 pl_t pl; /* for multi-threaded drivers */
5 pl = freezestr(q); /* for multi-threaded drivers */
6 (void) strqset(q, QMINPSZ, 0, min);
7 (void) strqset(q, QMAXPSZ, 0, max);
8 (void) strqset(q, QHIWAT, 0, hi);
9 (void) strqset(q, QLOWAT, 0, lo);
10 (void) strqset(OTHERQ(q), QMINPSZ, 0, min);
11 (void) strqset(OTHERQ(q), QMAXPSZ, 0, max);
12 (void) strqset(OTHERQ(q), QHIWAT, 0, hi);
13 (void) strqset(OTHERQ(q), QLOWAT, 0, lo);
14 unfreezestr(q,pl); /* for multi-threaded drivers */
15 }
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005