qsize(D3) qsize(D3)
NAME
qsize - find the number of messages on a queue
SYNOPSIS
#include <sys/stream.h>
#include <sys/ddi.h>
int qsize(queue_t *q);
Arguments
q Pointer to the queue to be evaluated.
DESCRIPTION
qsize evaluates the queue pointed to by 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 number of messages on the queue.
USAGE
Level
Base or Interrupt.
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
The caller cannot have the stream frozen [see freezestr(D3)]
when calling this function.
REFERENCES
msgb(D4), queue(D4)
NOTICES
Portability
All processors
Applicability
ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 1