SAMESTR(D3)SAMESTR(D3)NAMESAMESTR - test if next queue is of the same type
SYNOPSIS
#include <sys/stream.h>
#include <sys/ddi.h>
int SAMESTR(queue_t *q);
Arguments
q Pointer to the queue.
DESCRIPTION
The SAMESTR function checks whether the next queue in a stream (if it
exists) is of the same type as the current queue (that is, both are read
queues or both are write queues).
Return Values
SAMESTR returns 1 if the next queue is of the same type as the current
queue. It returns 0 if the next queue does not exist or if it is not of
the same type.
USAGE
This function can be used to determine the point in a STREAMS-based pipe
where a read queue is linked to a write queue.
Level
Base or Interrupt.
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks may be held
across calls to this function.
Examples
See the put(D2) manual page for an example of SAMESTR.
REFERENCESOTHERQ(D3)
Page 1