📄 samestr.9
字号:
'\" tr.\" -*- nroff -*-.\".\" @(#) SAMESTR.9,v 1.1.4.1 2004/01/12 23:32:57 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:57 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 SAMESTR 9 "2004/01/12 23:32:57" "LiS-2_16_18-8" "Linux STREAMS DDI/DKI".SH NAME.B SAMESTR\- test for \fISTREAMS\fR pipe or fifo.SH SYNOPSIS.PP.B #include <sys/stream.h>.HP 8.BI "int " retval " = SAMESTR(" q );.SH DESCRIPTION.PP.BR SAMESTR ()tests whether the next queue belongs to the same stream as the specifiedqueue.IR q ..BR SAMESTR ()can be used to detect whether or not.I qbelongs to a.BR pipe (3)or a.BR fifo (4)..SH "RETURN VALUES".PP.BR SAMESTR ()returns true (1) if the next queue from the specified queue,.IR q->q_next ,belongs to the same stream (read or write) as the specified queue.IR q .In this case, the queue.I qis not a.BR pipe (3)or.BR fifo (4)..PP.BR SAMESTR ()returns false (0) if the next queue from the specified queue,.IR q->q_next ,belongs to a different stream (read or write) as the specified queue.IR q .In this case, the queue.I qis a.BR pipe (3)or.BR fifo (4)..SH ERRORS.PPWhen.BR SAMESTR ()fails, it returnszero (0)..BR SAMESTR ()fails when the queue pointer.I qis.BR NULL ;.I qdoes not point to a valid queue structure;.I q->q_nextis.BR NULL ;.I q->q_nextdoes not point to a valid queue structure..SH CAVEATS.PP.B LiS.[LiS.]implements.BR SAMESTR ()as a function rather than as the more obviousmacro:.sp.nf#define SAMESTR(__q) (__q->q_flag & QREADR) == (__q->q_next->q_flag & QREADR).fi.PPThe.B LiS.[LiS.]function call is inefficient, particularly as this function is called oftenand regularly..SH "SEE ALSO".PP.BR RD (9),.BR WR (9),.BR OTHER (9)..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 + -