SAMESTR(D3DK) —
.IX \f4SAMESTR\fP(D3DK)
NAME
SAMESTR − test if next queue is same type
SYNOPSIS
#include <sys/stream.h>
int SAMESTR(queue_t ∗q);
ARGUMENTS
qPointer to the queue.
DESCRIPTION
The SAMESTR function is used to see if the next queue in a stream (if it exists) is the same type as the current queue (that is, both are read queues or both are write queues). This can be used to determine the point in a STREAMS-based pipe where a read queue is linked to a write queue.
RETURN VALUE
SAMESTR returns 1 if the next queue is the same type as the current queue. It returns 0 if the next queue does not exist or if it is not the same type.
LEVEL
Base or Interrupt.
NOTES
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks may be held across calls to this function.
The argument q may not reference q_next (for example, an argument of q->q_next is erroneous on a multiprocessor and is disallowed by the DDI/DKI).
SEE ALSO
OTHERQ(D3DK)
EXAMPLE
See the put(D2DK) manual page for an example of SAMESTR.
DDI/DKI — STREAMS