flushq(D3DK) —
.IX \f4flushq\fP(D3DK)
.IX STREAMS messages
NAME
flushq − flush messages on a queue
SYNOPSIS
#include <sys/stream.h>
void flushq(queue_t ∗q, int flag);
ARGUMENTS
qPointer to the queue to be flushed.
flagDetermines messages to flush. Valid flag values are:
FLUSHDATA
Flush only data messages (types M_DATA, M_DELAY, M_PROTO, and M_PCPROTO).
FLUSHALL Flush all messages.
DESCRIPTION
flushq frees messages on a queue by calling freemsg(D3DK) for each message. If the queue’s count falls below the low water mark and someone wants to write to the queue, the nearest upstream or downstream service procedure is enabled.
RETURN VALUE
None.
LEVEL
Base or Interrupt.
NOTES
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks may be held across calls to this function.
SEE ALSO
put(D2DK), flushband(D3DK), freemsg(D3DK), putq(D3DK), queue(D4DK)
EXAMPLE
See put(D2DK) for an example of flushq.
DDI/DKI — STREAMS