1
0
Files
2022-09-29 17:59:04 +03:00

63 lines
1.3 KiB
Plaintext

.if n .pH ddi.rm/d3/gen/flushq @(#)flushq 43.13 of 11/30/92
.\" Copyright 1992, 1991 UNIX System Laboratories, Inc.
.TH flushq D3
.IX "\f4flushq\fP(D3)"
.IX "STREAMS messages"
.SH NAME
\f4flushq\f1 \- flush messages on a queue
.SH SYNOPSIS
.nf
.na
.ft 4
#include <sys/stream.h>
#include <sys/ddi.h>
.sp 0.4
void flushq(queue_t *\f2q\fP, int \f2flag\fP);
.ft 1
.ad
.fi
.SS Arguments
.RS 0
.IP "\f2q\f1"
Pointer to the queue to be flushed.
.IP "\f2flag\f1"
Determines messages to flush.
.RE
.SH DESCRIPTION
\f4flushq\f1 frees messages on a queue by calling
\f4freemsg\f1(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.
.SS "Return Values"
None
.SH USAGE
Valid values for \f2flag\f1 are:
.RS
.TP 15
\f4FLUSHDATA\fP
.IX STREAMS messages
Flush only data messages (types \f4M_DATA\fP, \f4M_DELAY\fP, \f4M_PROTO\fP, and
\f4M_PCPROTO\fP).
.TP
\f4FLUSHALL\f1
Flush all messages.
.RE
.SS Level
Base or Interrupt.
.SS "Synchronization Constraints"
Does not sleep.
.P
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
.SS Examples
See \f4put\fP(D2) for an example of \f4flushq\fP.
.SH REFERENCES
.na
\f4flushband\fP(D3),
\f4freemsg\fP(D3),
\f4put\fP(D2),
\f4putq\fP(D3),
\f4queue\fP(D4)
.ad