man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2014
 
 

qsize(9F)

Name

qsize - find the number of messages on a queue

Synopsis

#include <sys/stream.h>

int qsize(queue_t *q);

Interface Level

Architecture independent level 1 (DDI/DKI).

Parameters

q

Queue to be evaluated.

Description

The qsize() function evaluates the queue q and returns the number of messages it contains.

Return Values

If there are no message on the queue, qsize() returns 0. Otherwise, it returns the integer representing the number of messages on the queue.

Context

The qsize() function can be called from user, interrupt, or kernel context.

See Also

Writing Device Drivers for Oracle Solaris 11.2

STREAMS Programming Guide