📄 flushband.9
字号:
'\" tr.\" -*- nroff -*-.\".\" @(#) flushband.9,v 1.1.4.1 2004/01/12 23:33:00 brian Exp.\".\" =========================================================================.\".\" Copyright (C) 2001-2004 OpenSS7 Corp. <www.openss7.com>.\".\" All Rights Reserved..\".\" Permission is granted to make and distribute verbatim copies of this.\" manual provided the copyright notice and this permission notice are.\" preserved on all copies..\".\" Permission is granted to copy and distribute modified versions of this.\" manual under the conditions for verbatim copying, provided that the.\" entire resulting derived work is distributed under the terms of a.\" permission notice identical to this one.\" .\" Since the Linux kernel and libraries are constantly changing, this.\" manual page may be incorrect or out-of-date. The author(s) assume no.\" responsibility for errors or omissions, or for damages resulting from.\" the use of the information contained herein. The author(s) may not.\" have taken the same level of care in the production of this manual,.\" which is licensed free of charge, as they might when working.\" professionally..\" .\" Formatted or processed versions of this manual, if unaccompanied by.\" the source, must acknowledge the copyright and authors of this work..\".\" =========================================================================.\".\" Modified 2004/01/12 23:33:00 by brian.\".\" =========================================================================.so lis.macros.R1bracket-label "\fR[\fB" "\fR]" "\fR, \fB"no-default-databasedatabase lis.refsaccumulatemove-punctuationabbreviate Ajoin-authors ", " ", " " and "et-al " et al" 2 3abbreviate-label-ranges ".."sort-adjacent-labels.R2.\".\".TH FLUSHBAND 9 "2004/01/12 23:33:00" "LiS-2_16_18-8" "Linux STREAMS DDI/DKI".SH NAME.B flushband\- flushes band \fISTREAMS\fR messages from a message queue.SH SYNOPSIS.PP.B #include <sys/stream.h>.HP 8.BI "flushband(queue_t *" q ", unsigned char " band ", int " flag );.SH DESCRIPTION.PP.BR flushband ()is used to flush messages from a.IR STREAMS (4)message queue band. It is typicallycalled in a.B M_FLUSHhandling routine to flush the requested messsages from a queue band..PPThe arguments to.BR flushband ()are interpreted as follows:.TP 8.I qThe queue to flush..TP 8.I bandThe band to flush within the queue..TP 8.I flagHow to flush the band within the queue..I flagcan be one of the following:.RS.TP 12.B FLUSHDATAFlush only data messages; do not flush the control messages from the queueband..TP 12.B FLUSHALLFlush all the messages from queue band: both data messages and controlmessages..RE.SH EXAMPLES.PP.BR flushband ()is normally used within the.B M_FLUSHhandling procedures for a.IR STREAMS (4)module or driver as follows:.sp.in +4.nf\fC\s-2\int x_w_flush(queue_t *q, mblk_t *mp){ if (*mp->b_rptr & FLUSHW) { if (*mp->b_rptr & FLUSHBAND) flushband(WR(q), mp->b_rptr[1], FLUSHALL); else flushq(WR(q), FLUSHALL); if (q->q_next) { putnext(q, mp); return (0); } *mp->b_rptr &= ~FLUSHW; } if (*mp->b_rptr & FLUSHR) { if (*mp->b_rptr & FLUSHBAND) flushband(RD(q), mp->b_rptr[1], FLUSHALL); else flushq(RD(q), FLUSHALL); if (!q->q_next) { qreply(q, mp); return (0); } *mp->b_rptr &= ~FLUSHR; } freemsg(mp); return (0);}int x_r_flush(queue_t *q, mblk_t *mp){ if (*mp->b_rptr & FLUSHR) { if (*mp->b_rptr & FLUSHBAND) flushband(RD(q), mp->b_rptr[1], FLUSHALL); else flushq(RD(q), FLUSHALL); if (q->q_next) { putnext(q, mp); return (0); } *mp->b_rptr &= ~FLUSHR; } if (*mp->b_rptr & FLUSHW) { if (*mp->b_rptr & FLUSHBAND) flushband(WR(q), mp->b_rptr[1], FLUSHALL); else flushq(WR(q), FLUSHALL); if (!q->q_next) { qreply(q, mp); return (0); } *mp->b_rptr &= ~FLUSHW; } freemsg(mp); return (0);}\s+2\fR.fi.SH "RETURN VALUES".BR flushband ()returns.BR void ..SH ERRORS.PPIf the.I qpassed to.BR flushband ()is.BR NULL ,or the.I qdoes not point to a valid queue structure, then.BR flushband ()will silently fail..SH CAVEATS.PP.B LiS.[LiS.]implements the call to.BR flushq (9).BI flushq( q ", " band )as a call to.BI flushband( q ", " 0 ", " flag )..SH "SEE ALSO".PP.BR flushq (9)..SH VERSIONS.PPThis manpage was written for.B LiS\c..[LiS.].PP.BR flushband ()first appeared in SVR 3..[svr3.].\".\".XX.[magic.].[svr42.].[svr4.].\".\".[$LIST$.].TA
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -