flushq(D3)

flushq - flush messages on a queue

As shipped in IRIX 6.5.7. Unchanged since IRIX 6.5.

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.

   Examples
     See put(D2) for an example of flushq.

REFERENCES
     flushband(D3), freemsg(D3), put(D2), putq(D3), queue(D4)