Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

samestr(9f) [opensolaris man page]

SAMESTR(9F)						   Kernel Functions for Drivers 					       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 STREAMS Programming Guide SunOS 5.11 16 Jan 2006 SAMESTR(9F)

Check Out this Related Man Page

WR(9F)							   Kernel Functions for Drivers 						    WR(9F)

NAME
WR, wr - get pointer to the write queue for this module or driver SYNOPSIS
#include <sys/stream.h> #include <sys/ddi.h> queue_t *WR(queue_t *q); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
q Pointer to the read queue whose write queue is to be returned. DESCRIPTION
The WR() function accepts a read queue pointer as an argument and returns a pointer to the write queue of the same module. CAUTION: Make sure the argument to this function is a pointer to a read queue. WR() will not check for queue type, and a system panic could result if the pointer is not to a read queue. RETURN VALUES
The pointer to the write queue. CONTEXT
The WR() function can be called from user, interrupt, or kernel context. EXAMPLES
Example 1 Using WR() In a STREAMS close(9E) routine, the driver or module is passed a pointer to the read queue. These usually are set to the address of the module-specific data structure for the minor device. 1 xxxclose(q, flag) 2 queue_t *q; 3 int flag; 4 { 5 q->q_ptr = NULL; 6 WR(q)->q_ptr = NULL; . . . 7 } SEE ALSO
close(9E), OTHERQ(9F), RD(9F) Writing Device Drivers STREAMS Programming Guide SunOS 5.11 16 Jan 2006 WR(9F)
Man Page

2 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Unix hash queue

How is the hash queue categorized? I am trying to understand the free list vs the hash queue and i'm just not getting it. The book im using is written like you already have a degree in Unix architecture. Maybe someone knows a web site that explains this in laymans terms. A Unix architecture for... (1 Reply)
Discussion started by: HPCnewbie
1 Replies

2. AIX

Performance monitoring

Hi All I am looking for a script that would collect statistics in a summarised format. CPU, Memory,Swap, Wait queue, Run queue and disk activity. Something that would allow me to profile the environment based on a 1 line output that I could run every 15 min. Thx Junaid (1 Reply)
Discussion started by: jhansrod
1 Replies