Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2017
 
 

samestr(9F)

Name

SAMESTR, samestr - test if next queue is in the same stream

Synopsis

#include <sys/stream.h>

int SAMESTR(queue_t *q);

Interface Level

Architecture independent level 1 (DDI/DKI).

Parameters

q

Pointer 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 function accounts for the twisted queue connections that occur in a STREAMS pipe and should be used in preference to direct examination of the q_next field of queue(9S) to see if the stream continues beyond q.

Return Values

The SAMESTR() function 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.

Context

The SAMESTR() function can be called from user, interrupt, context.

See Also

OTHERQ(9F)

Writing Device Drivers for Oracle Solaris 11.3

STREAMS Programming Guide