STREAMS-UX Programmer's Guide (February 2007)

STREAMS Utilities Supported by HP-UX
Appendix B
189
NAME
OTHERQ () – Returns the pointer to queue’s partner queue.
SYNOPSIS
#include <sys/stream.h>
queue_t *OTHERQ (queue_t *q);
ARGUMENTS
q
Pointer to the queue.
DESCRIPTION
The OTHERQ() returns a pointer to the other of the queue-pair structures that make up a STREAMS
module/driver. If q points to the read queue, the write queue will be returned and vice versa.
RETURN VALUES
OTHERQ() returns a pointer to a queue’s partner.
CONSTRAINTS
OTHERQ() can be called from thread or interrupt context. Spinlocks can be held across this call.