OTHERQ(D3)
OTHERQ - get a pointer to queue's partner queue
As shipped in IRIX 6.5.22. Unchanged since IRIX 6.5.
NAME OTHERQ - get a pointer to queue's partner queue SYNOPSIS #include <sys/stream.h> #include <sys/ddi.h> queue_t *OTHERQ(queue_t *q); Arguments q Pointer to the queue. 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. Return Values OTHERQ returns a pointer to a queue's partner. USAGE Level Base or Interrupt. Synchronization Constraints Does not sleep. Multithreaded drivers may hold driver-defined basic locks, read/write locks, and sleep locks across calls to this function. 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 (void) strqset(q, QMINPSZ, 0, min); 6 (void) strqset(q, QMAXPSZ, 0, max); 7 (void) strqset(q, QHIWAT, 0, hi); 8 (void) strqset(q, QLOWAT, 0, lo); 9 (void) strqset(OTHERQ(q), QMINPSZ, 0, min); 10 (void) strqset(OTHERQ(q), QMAXPSZ, 0, max); 11 (void) strqset(OTHERQ(q), QHIWAT, 0, hi); 12 (void) strqset(OTHERQ(q), QLOWAT, 0, lo); 13 } REFERENCES RD(D3), WR(D3)