flushq(D3) flushq(D3)
NAME
flushq - flush messages on a queue
SYNOPSIS
#include <sys/stream.h>
#include <sys/ddi.h>
void flushq(queue_t *q, int flag);
Arguments
q Pointer to the queue to be flushed.
flag Determines messages to flush.
DESCRIPTION
flushq frees messages on a queue by calling freemsg(D3) 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 Values
None
USAGE
Valid values for flag are:
FLUSHDATA Flush only data messages (types M_DATA,
M_DELAY, M_PROTO, and M_PCPROTO).
FLUSHALL Flush all messages.
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.
Examples
See put(D2) for an example of flushq.
Copyright 1994 Novell, Inc. Page 1
flushq(D3) flushq(D3)
REFERENCES
flushband(D3), freemsg(D3), put(D2), putq(D3), queue(D4)
NOTICES
Portability
All processors
Applicability
ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 2