STREAMS-UX Programmer's Guide (February 2007)
STREAMS Utilities Supported by HP-UX
Appendix B
205
NAME
qsize () – Returns the number of messages in a queue.
SYNOPSIS
#include <sys/stream.h>
int qsize (queue_t *q);
PARAMETERS
q
Pointer to queue.
RETURN VALUES
This function returns the number of messages in the specified queue. If the message queue is empty, 0 is
returned.
CONSTRAINTS
qsize() can be called from thread or interrupt context. Spinlocks of STREAMS/UX user lock order can be
held across calls to this function for modules/drivers configured with a synchronization level of
SQLVL_NOSYNC. For modules/drivers configured with any other synchronization level, spinlocks that are not
necessarily of the STREAMS/UX user lock order, can be held across calls to this function.