STREAMS-UX Programmer's Guide (February 2007)

STREAMS Utilities Supported by HP-UX
Appendix B
174
NAME
flushq () – Flushes the specified queue.
SYNOPSIS
#include <sys/stream.h>
void flushq(queue_t *q, int flag);
PARAMETERS
q
Queue pointer.
flag
Determines messages to be flushed. Valid flag values are:
FLUSHDATA Flush data messages only (M_DATA, M_PROTO, M_PCPROTO, M_DELAY).
FLUSHALL Flush all messages.
DESCRIPTION
flushq() uses the freemsg() function to free each relevant message in the queue, based on the flag
parameter value. If and when the queue message length falls below the low watermark and if a previous
service procedure wants to write to this queue, the previous queue’s service procedure is enabled.
RETURN VALUES
None
CONSTRAINTS
flushq() can be called from thread or interrupt context. Only spinlocks of STREAMS/UX user lock order can
be held across this call.