⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bcanput.9

📁 7号信令功能代码,为开源代码
💻 9
字号:
'\" tr.\" -*- nroff -*-.\".\" @(#) bcanput.9,v 1.1.4.1 2004/01/12 23:32:58 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:32:58 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 BCANPUT 9 "2004/01/12 23:32:58" "LiS-2_16_18-8" "Linux STREAMS DDI/DKI".SH "NAME".B bcanput\- test flow control on a \fISTREAMS\fR message queue.SH "SYNOPSIS".PP.B #include <sys/stream.h>.HP 8.BI "int " retval " = bcanput(queue_t *" q ", unsigned char " band );.SH "DESCRIPTION".PPIt is the responsibility of a.IR STREAMS (4)module puting a banded non-prioritymessage to a subsequent message queue to check for flow control using.BR bcanput ()for the band associated with the message before placing a message on the queuewith.BR putq (9)..PP.BR bcanput ()checks whether the stream is flow controlled starting at the specified queue,.IR q ,and for the specified .IR band .Starting at the.I qspecified and for the.I bandspecified,.BR bcanput ()looks for the next forward queue which has a service routine or which has nofurther forward queue..PPIf this forward queue has the.B QB_FULLflag clear indicating that it is not full for the specified.IR band ,.BR bcanput ()will return true (1)..PPIf this forward queue has the.B QB_FULLflag set indicating that it is full for the specified.IR band ,.BR bcanput ()will return false (0)..PPWhen.BR bcanput ()returns false (0), it also sets the.B QB_WANTWflag for the specified.IR band ,indicating that the.IR STREAMS (4)executive should backenable serviceprocedures backwards up the queues when the flow controlled.I bandis no longer full..SH "RETURN VALUES".PP.BR bcanput ()will return false (0) when the specified.IR STREAMS (4)message queue is flowcontrolled for the specified band, and return true (1) when the specified.IR STREAMS (4)message queue is not flow controlled for the specified band..SH "ERRORS".PP.BR bcanput ()always succeed..SH "CAVEATS".PPIn the.B LiS.[LiS.]implementation, if.BR bcanput ()suffers an internal error, it will return false (0).This is problematic because the calling queue will never be backenabled..PP.B LiS.[LiS.]implements\fB\)canput(\fI\)q\fB\))\fR\),\fB\)canputnext(\fI\)q\fB\))\fR\) and\fB\)bcanputnext(\fI\)q\fB\), \fI\)band\fB\))\fR\)with macros that call\fB\)bcanput(\fI\)q\fB\), \fI\)band\fB\))\fR\)..SH "NOTES".PP.B LfS.[LfS.]implements.BR bcanput ()and.BR bcanputnext (9)functions directly and ensures integrity of dereferencing ofthe.I qpointer.  This means that, while equivalent,.BI bcanput( q->q_next ", " band )and.BI bcanputnext( q ", " band )are different in that the caller is responsible for protecting the integrity ofthe.I q->q_nextdereferencing for.BI bcanput( q->q_next ", " band )\fR.Driver and module writers should always use.BI bcanputnext( q ", " band )instead of.BI bcanput( q->q_next ", " band )\fR.In fact, driver and module writers should avoid the dereference.I q->q_nextaltogether..SH "SEE ALSO".PP.BR putq (9),.BR canput (9),.BR canputnext (9),.BR bcanputnext (9),.BR noenable "(9), and ".BR enableok (9)..SH HISTORY.PP.BR bcanput ()first appeared in SVR 4..[svr4.].SH "VERSIONS".PPThis manpage was written for.B LiS\c..[LiS.].\".\".XX.[magic.].[svr42.].[svr4.].\".\".[$LIST$.].TA

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -