| OpenSS7 SS7 for the Common Man | © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. Last modified: Sat, 01 Nov 2008 10:41:53 GMT | ||||||||||||||||
| |||||||||||||||||
| Description: Manual PageKeywords: ss7 ss7/ip ss7 over ip ss7 mtp ss7 sccp ss7 tcap sigtran mtp sccp tcap openss7 acb56 linux telephony pstn linux telephony linux nebs linux compactpciCANENABLESection: Linux Fast-STREAMS DDI/DKI (9)Updated: 2008-10-31 Index Return to Main Contents NAMEcanenable - test whether a STREAMS message queue can be scheduled.SYNOPSIS#include <sys/stream.h>
ARGUMENTS
INTERFACEDESCRIPTIONcanenable() tests whether the queue pointed to by q can be enabled (qi_srvp(9) procedure scheduled for execution by runqueues(9)) by placing a (normal) message on the queue. If the queue, q, has been disabled with noenable(9), setting the the QNOENB flag in the q_flag member of the queue(9) strucuture, then this utility will return false (0). If the queue, q, has been enabled with enableok(9), clearing the QNOENB flag in the q_flag member of the queue(9) structure, then this utility will return true (1). USAGEThis function is typically called before a call to appq(9), putq(9), or insq(9) when the caller wishes to determine whether appq(9), putq(9), or insq(9) can result in the scheduling of the queue's qi_srvp(9) procedure. RETURNcanenable() returns true (1) if the queue pointed to by q can be enabled with appq(9), putq(9), or insq(9), or back-enabled by the previous queue. canenable() returns false (0) if the queue pointed to by q cannot be enabled with appq(9), putq(9), or insq(9), or back-enabled by the previous queue. ERRORScanenable() is always successful. CONTEXTcanenable() can be called from any context, including user context, module procedures, callouts, callbacks, soft interrupts (tasklets and bottom halves), and interrupt service routines. It is normally called from a STREAMS synchronous context [see mp-streams(9)], that is, within q's qi_putp(9) put procedure. MP-STREAMScanenable() is not MP-safe. Consideration should be given that the condition tested may change before the return value is used if noenable(9), enableok(9), qprocson(9) or qprocsoff(9) are allowed to execute concurrent with canenable(). NOTICESIt is questionable whether canenable() is usable in a Symmetric Multi-Processor (SMP) environment. canenable() tests atomic flags in the queue(9) structure flags word that can be altered by other processors immediately prior to, or subsequent to, the call to canenable(). Therefore, there is always a race condition possible between canenable() and noenable(9), enableok(9), qprocson(9), qprocsoff(9), (or other utilities affecting the QNOENB flag in the queue(9) flags word) on SMP systems. canenable() might have some limited use on UP systems where interrupts can be locked out across the call, or on SMP systems where the Stream is frozen by freezestr(9). Portable STREAMS drivers and modules will not call canenable(). IMPLEMENTATIONcanenable() simply returns the result of testing the QNOENB bit. EXAMPLESSEE ALSOputq(9), insq(9), appq(9), qenable(9), noenable(9), enableok(9), qprocson(9), qprocsoff(9), freezestr(9), STREAMS(9). BUGScanenable() has no known bugs, but see the limitations under MP-STREAMS , above. COMPATIBILITYcanenable() is compatible with SVR 4.0[1] and implementations compatible with SVR 3.2[2] with the following portability considerations:
Additional compatibility is available using the STREAMS Compatibility Modules strcompat(5) package for LiS and Linux Fast-STREAMS. See svr3compat(9), liscompat(9), and STREAMS(9) for additional compatibility considerations. CONFORMANCEHISTORYcanenable() first appeared in SVR 3[2]. REFERENCES
TRADEMARKS
Other trademarks are the property of their respective owners. IDENTIFICATION
Copyright©1997-2008OpenSS7 Corp.
All Rights Reserved.
Index
This document was created by man2html, using the manual pages. Time: 13:50:05 GMT, June 18, 2013 | ||||||||||||||||
| OpenSS7 SS7 for the Common Man |
| ||||||||||||||||
| Last modified: Sat, 01 Nov 2008 10:41:53 GMT © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. |