| OpenSS7 SS7 for the Common Man | © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. Last modified: Sat, 01 Nov 2008 10:41:54 GMT | ||||||||||||||||
| |||||||||||||||||
| Manpage of ENABLEOKDescription: 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 compactpciENABLEOKSection: Linux Fast-STREAMS DDI/DKI (9)Updated: 2008-10-31 Index Return to Main Contents NAMEenableok - allows a STREAMS message queue to be scheduledSYNOPSIS#include <sys/stream.h>
ARGUMENTS
INTERFACEDESCRIPTIONenableok() clears the QNOENB flag on the specified queue, q. This tells the STREAMS scheduler that the queue, q, can be scheduled for runqueues(9). enableok() is typically used to re-enable a queue after it has been disabled with noenable(9). If enableok() has been called for a queue and noenable(9) has not subsequently been called for the same queue a second call to enableok() will have no effect. Queues that have their QNOENB flag clear will enable the qi_srvp(9) procedure under all normal queue enabling situations, as follows:
See also noenable(9). Note that enableok() does not schedule the queue's qi_srvp(9) procedure regardless of the state of the queue: it simply clears the QNOENB flag. It takes further actions (as listed above) to cause the queue's qi_srvp(9) procedure to be scheduled. USAGEenableok() can be used in conjunction with noenable(9) to temporarily suspend queue qi_srvp(9) procedure processing for a queue for normal priority messages. noenable(9) permits data messages to be enqueued without invoking the queue's qi_srvp(9) procedure. A call to enableok() will then reverse the situation and restore normal queue scheduling. RETURNenableok() clears the QNOENB flag and returns void. ERRORSCONTEXTenableok() can be called from any context, including user context, module procedures, callouts, callbacks, soft interrupts (tasklets and bottom halves), and interrupt service routines. MP-STREAMSenableok() is MP-safe. No global locks need to be held across the call to enableok(). enableok() takes a recursive freeze lock that can be acquired by the caller when the Stream is frozen. If another thread has the Stream frozen with freezestr(9), the calling processor will spin until the Stream is thawed by unfreezestr(9). If one thread enables a queue with enableok() and another disables the queue with noenable(9), there will be a race condition on the QNOENB flag. NOTICESenableok() does not place the queue on the current runqueues(9) schedule list. It only clears the QNOENB flag to indicate whether the queue should be subsequently scheduled. To add a queue to the current run list, use qenable(9). EXAMPLEenableok(9) can be used to re-enable a queue after a call to noenable(9). The following qrestart() function will restart a disabled queue:
void qrestart(queue_t *q)
{
enableok(q);
if (q->q_first)
qenable(q);
}
Note that enableok() does not place the queue on the runqueues() list. It takes qenable(9) to do that. SEE ALSOcanenable(9), enableok(9), freezestr(9), noenable(9), noneable(9), qenable(9), runqueues(9). BUGSCOMPATIBILITYenableok() is source-level compatible with SVR 4.2 MP DDI/DKI[1], and systems based on SVR 4, with the following portability considerations:
See STREAMS(9) for additional compatibility considerations. CONFORMANCEHISTORYenableok() appears as part of SVR 4.0 STREAMS [7]. enableok() first appeared in SVR 3[8]. 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: 23:01:14 GMT, May 22, 2013 | ||||||||||||||||
| OpenSS7 SS7 for the Common Man |
| ||||||||||||||||
| Last modified: Sat, 01 Nov 2008 10:41:54 GMT © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. |