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
canput(9F) Kernel Functions for Drivers canput(9F)NAME
canput - test for room in a message queue
SYNOPSIS
#include <sys/stream.h>
int canput(queue_t *q);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
PARAMETERS
q Pointer to the message queue.
DESCRIPTION
canput() searches through the stream (starting at q) until it finds a queue containing a service routine where the message can be enqueued,
or until it reaches the end of the stream. If found, the queue containing the service routine is tested to see if there is room for a mes-
sage in the queue.
canputnext(q) and bcanputnext(q, pri) should always be used in preference to canput(q->q_next) and bcanput(q->q_next, pri) respectively.
RETURN VALUES
1 If the message queue is not full.
0 If the queue is full.
CONTEXT
canput() can be called from user or interrupt context.
SEE ALSO bcanput(9F), bcanputnext(9F), canputnext(9F), putbq(9F), putnext(9F)
Writing Device Drivers
STREAMS Programming Guide
WARNINGS
Drivers are responsible for both testing a queue with canput() and refraining from placing a message on the queue if canput() fails.
SunOS 5.10 11 Apr 1991 canput(9F)
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)
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)