📄 streams.doc14.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="../../wrs.css"><title>Porting STREAMS Protocols to WindNet STREAMS WindNet STREAMS for Tornado </title></head><body bgcolor="FFFFFF"><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="../../icons/contents.gif"></a><a href="streams.doc13.html"><img border="0" alt="[Prev]" src="../../icons/prev.gif"></a><a href="streams.doc15.html"><img border="0" alt="[Next]" src="../../icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h3 class="H2"><i><a name="72075" class="autotag">4.2 WindNet STREAMS Services Accessible from Interrupt Context</a></i></h3></font><dl class="margin"><dd><dl class="margin"><dd><p class="Body"><a name="72076" class="autotag"> </a>In a real-time environment where interrupt lock-out time should be kept to the smallest duration possible, it is important for driver interrupt handlers to defer interrupt processing to background tasks. Given this constraint, drivers that require interrupt access to WindNet STREAMS routines are allowed to schedule the execution of STREAMS routines only to a background task. The STREAMS routines themselves handle this internally. These routines are listed below:</p></dd></dl><dl class="margin"><dd><div class="Item"><a name="72077" class="autotag"> </a><b class="routine"><i class="routine">qenable</i></b><b>( )</b></div><dl class="margin"><dd><div class="Indent"><a name="95335" class="autotag"> </a>Schedules a STREAMS queue service procedure specified by the queue that has been passed to <b class="routine"><i class="routine">qenable</i></b><b>( )</b>.</div><br><div class="Indent"><a name="75408" class="autotag"> </a>One typical use of this routine by a hardware driver is illustrated by the driver's receive interrupt handler. The interrupt handler issues the necessary commands to the hardware device and defers non-critical processing to a background task by invoking <b class="routine"><i class="routine">qenable</i></b><b>( )</b>. In this case, the queue read service procedure for the STREAMS device driver can be used to finish the processing of the hardware interrupt, and to pass the received packet upstream. For more information, see the manual entry for <b class="routine"><i class="routine">qenable</i></b><b>( )</b>.</div><br></dd></dl><div class="Item"><a name="72078" class="autotag"> </a><b class="routine"><i class="routine">putq</i></b><b>( )</b></div><dl class="margin"><dd><div class="Indent"><a name="95337" class="autotag"> </a>Schedules a STREAMS queue service procedure and places a message in the queue. For hardware drivers that can receive data and put it into STREAMS buffers directly, this routine offers the capability of queuing a message for the STREAMS driver and deferring the interrupt processing to the queue service procedure. The typical usage provided for <b class="routine"><i class="routine">qenable</i></b><b>( )</b> is applicable to <b class="routine"><i class="routine">putq</i></b><b>( )</b>. For more information, see the manual entry for <b class="routine"><i class="routine">putq</i></b><b>( )</b>.</div><br></dd></dl><div class="Item"><a name="72079" class="autotag"> </a><b class="routine"><i class="routine">freeb</i></b><b>( )</b></div><dl class="margin"><dd><div class="Indent"><a name="95339" class="autotag"> </a>Returns a STREAMS buffer to the free pool. One typical use of <b class="routine"><i class="routine">freeb</i></b><b>( )</b> by a hardware driver is illustrated by the driver's transmit interrupt handler. The interrupt handler invokes <b class="routine"><i class="routine">freeb</i></b><b>( )</b> each time a STREAMS buffer of data is transmitted to the network. For more information, see the manual entry for <b class="routine"><i class="routine">freeb</i></b><b>( )</b>.</div><br></dd></dl></dd></dl></dd></dl><a name="foot"><hr></a><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="../../icons/contents.gif"></a><a href="streams.doc13.html"><img border="0" alt="[Prev]" src="../../icons/prev.gif"></a><a href="streams.doc15.html"><img border="0" alt="[Next]" src="../../icons/next.gif"></a></p></body></html><!---This file generated April 10, 1998, 12:25PM PDTby WRS Documentation (jeff), Wind River Systems, Inc. conversion tool: Quadralay WebWorks Publisher 3.5.0 template: CSS Template, Jan 1998 - Jefro --->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -