1SAMESTR(9F)              Kernel Functions for Drivers              SAMESTR(9F)
2
3
4

NAME

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

SYNOPSIS

9       #include <sys/stream.h>
10
11
12
13       int SAMESTR(queue_t *q);
14
15

INTERFACE LEVEL

17       Architecture independent level 1 (DDI/DKI).
18

PARAMETERS

20       q    Pointer to the queue.
21
22

DESCRIPTION

24       The SAMESTR() function is used to see if the next queue in a stream (if
25       it exists) is the same type as the current queue  (that  is,  both  are
26       read  queues  or both are write queues). This function accounts for the
27       twisted queue connections that occur in a STREAMS pipe  and  should  be
28       used  in  preference  to  direct  examination  of  the  q_next field of
29       queue(9S) to see if the stream continues beyond q.
30

RETURN VALUES

32       The SAMESTR() function returns 1 if the next queue is the same type  as
33       the  current queue. It returns 0 if the next queue does not exist or if
34       it is not the same type.
35

CONTEXT

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

SEE ALSO

40       OTHERQ(9F)
41
42
43       Writing Device Drivers
44
45
46       STREAMS Programming Guide
47
48
49
50SunOS 5.11                        16 Jan 2006                      SAMESTR(9F)
Impressum