亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? c-iosys9.html

?? this about vxworks operations systems
?? HTML
?? 第 1 頁 / 共 5 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title>    I/O System   </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="GuideIX.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-iosys.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-iosys8.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-filesys.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="85069">3.9  &nbsp;&nbsp;Internal Structure</a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85070"> </a>The VxWorks I/O system is different from most in the way the work of performing user I/O requests is apportioned between the device-independent I/O system and the device drivers themselves.</p><dd><p class="Body"><a name="85072"> </a>In many systems, the device driver supplies a few routines to perform low-level I/O functions such as inputting or outputting a sequence of bytes to character-oriented devices. The higher-level protocols, such as communications protocols on character-oriented devices, are implemented in the device-independent part of the I/O system. The user requests are heavily processed by the I/O system before the driver routines get control.</p><dd><p class="Body"><a name="85073"> </a>While this approach is designed to make it easy to implement drivers and to ensure that devices behave as much alike as possible, it has several drawbacks. The driver writer is often seriously hampered in implementing alternative protocols that are not provided by the existing I/O system. In a real-time system, it is sometimes desirable to bypass the standard protocols altogether for certain devices where throughput is critical, or where the device does not fit the standard model.</p><dd><p class="Body"><a name="85074"> </a>In the VxWorks I/O system, minimal processing is done on user I/O requests before control is given to the device driver. Instead, the VxWorks I/O system acts as a switch to route user requests to appropriate driver-supplied routines. Each driver can then process the raw user requests as appropriate to its devices. In addition, however, several high-level subroutine libraries are available to driver writers that implement standard protocols for both character- and block-oriented devices. Thus the VxWorks I/O system gives you the best of both worlds: while it is easy to write a standard driver for most devices with only a few pages of device-specific code, driver writers are free to execute the user requests in nonstandard ways where appropriate.</p><dd><p class="Body"><a name="85076"> </a>There are two fundamental types of device: <i class="term">block</i> and <i class="term">character</i> (or <i class="term">non-block</i>; see <a href="c-iosys9.html#93984">Figure&nbsp;3-8</a>). Block devices are used for storing file systems. They are random access devices where data is transferred in blocks. Examples of block devices include hard and floppy disks. Character devices are any device that does not fall in the block category. Examples of character devices include serial and graphical input devices, for example, terminals and graphics tablets.</p><dd><p class="Body"><a name="85080"> </a>As discussed in earlier sections, the three main elements of the VxWorks I/O system are drivers, devices, and files. The following sections describe these elements in detail. The discussion focuses on character drivers; however, much of it is applicable for block devices. Because block drivers must interact with VxWorks file systems, they use a slightly different organization; see <a href="c-iosys9.html#85946"><i class="title">3.9.4&nbsp;Block Devices</i></a>.</p></dl></dl><dl class="margin"><dd><p class="table" callout><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td valign="top" width="40"><br><img border="0" alt="*" src="icons/note.gif"></td><td><hr><div class="CalloutCell"><a name="97378"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE:  </font></b></a>This discussion is designed to clarify the structure of VxWorks I/O facilities and to highlight some considerations relevant to writing I/O drivers for VxWorks. It is not a complete text on writing a device driver. For detailed information on this subject, see the <i class="title">Tornado BSP Developer's Kit User's Guide</i>.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout><dl class="margin"><dd><p class="Body"><a name="85087"> </a><a href="c-iosys9.html#85091">Example&nbsp;3-9</a> shows the abbreviated code for a hypothetical driver that is used as an example throughout the following discussions. This example driver is typical of drivers for character-oriented devices.</p><dd><p class="Body"><a name="85088"> </a>In VxWorks, each driver has a short, unique abbreviation, such as <b class="file">net</b> or <b class="file">tty</b>, which is used as a prefix for each of its routines. The abbreviation for the example driver is <i class="textVariable">xx</i>.</p></dl></dl><h4 class="EntityTitle"><a name="85091"><font face="Helvetica, sans-serif" size="-1" class="sans">Example 3-9:&nbsp;&nbsp;Hypothetical Driver</font></a></h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="85092">/************************************************************************* * xxDrv - driver initialization routine * * xxDrv() initializes the driver. It installs the driver via iosDrvInstall. * It may allocate data structures, connect ISRs, and initialize hardware. */  STATUS xxDrv ()   {   xxDrvNum = iosDrvInstall (xxCreat, 0, xxOpen, 0, xxRead, xxWrite, xxIoctl);   (void) intConnect (intvec, xxInterrupt, ...);   ...   }</a></b><dd> <b><a name="86852">/************************************************************************* * xxDevCreate - device creation routine * * Called to add a device called &lt;name&gt; to be serviced by this driver. Other * driver-dependent arguments may include buffer sizes, device addresses... * The routine adds the device to the I/O system by calling iosDevAdd. * It may also allocate and initialize data structures for the device, * initialize semaphores, initialize device hardware, and so on. */  STATUS xxDevCreate (name, ...)   char * name;   ...   {   status = iosDevAdd (xxDev, name, xxDrvNum);   ...   }</a></b><dd> <b><a name="86853">/************************************************************************* * The following routines implement the basic I/O functions. The xxOpen()  * return value is meaningful only to this driver, and is passed back as an * argument to the other I/O routines. */</a></b><dd> <b><a name="93434">int xxOpen (xxDev, remainder, mode)   XXDEV * xxDev;   char * remainder;   int mode;   {   /* serial devices should have no file name part */     if (remainder[0] != 0)     return (ERROR);   else     return ((int) xxDev);   }  int xxRead (xxDev, buffer, nBytes)   XXDEV * xxDev;   char * buffer;   int nBytes;   ... int xxWrite (xxDev, buffer, nBytes)   ... int xxIoctl (xxDev, requestCode, arg)   ...</a></b><dd> <b><a name="86854">/************************************************************************* * xxInterrupt - interrupt service routine * * Most drivers have routines that handle interrupts from the devices * serviced by the driver. These routines are connected to the interrupts * by calling intConnect (usually in xxDrv above). They can receive a * single argument, specified in the call to intConnect (see intLib). */  VOID xxInterrupt (arg)   ...</a></b></pre></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="85094">3.9.1  &nbsp;&nbsp;Drivers </a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85095"> </a>A driver for a non-block device implements the seven basic I/O functions--<b class="routine"><i class="routine">creat</i></b><b>(</b>&nbsp;<b>)</b>, <b class="routine"><i class="routine">remove</i></b><b>(</b>&nbsp;<b>)</b>, <b class="routine"><i class="routine">open</i></b><b>(</b>&nbsp;<b>)</b>, <b class="routine"><i class="routine">close</i></b><b>(</b>&nbsp;<b>)</b>, <b class="routine"><i class="routine">read</i></b><b>(</b>&nbsp;<b>)</b>, <b class="routine"><i class="routine">write</i></b><b>(</b>&nbsp;<b>)</b>, and <b class="routine"><i class="routine">ioctl</i></b><b>(</b>&nbsp;<b>)</b>--for a particular kind of device. In general, this type of driver has routines that implement each of these functions, although some of the routines can be omitted if the functions are not operative with that device. </p><dd><p class="Body"><a name="85096"> </a>Drivers can optionally allow tasks to wait for activity on multiple file descriptors. This is implemented using the driver's <b class="routine"><i class="routine">ioctl</i></b><b>(&nbsp;)</b> routine; see <a href="c-iosys9.html#85695"><i class="title">Implementing select(&nbsp;)</i></a>.</p><dd><p class="Body"><a name="85100"> </a>A driver for a block device interfaces with a file system, rather than directly with the I/O system. The file system in turn implements most I/O functions. The driver need only supply routines to read and write blocks, reset the device, perform I/O control, and check device status. Drivers for block devices have a number of special requirements that are discussed in <a href="c-iosys9.html#85946"><i class="title">3.9.4&nbsp;Block Devices</i></a>.</p><dd><p class="Body"><a name="85104"> </a>When the user invokes one of the basic I/O functions, the I/O system routes the request to the appropriate routine of a specific driver, as detailed in the following sections. The driver's routine runs in the calling task's context, as though it were called directly from the application. Thus, the driver is free to use any facilities normally available to tasks, including I/O to other devices. This means that most drivers have to use some mechanism to provide mutual exclusion to critical regions of code. The usual mechanism is the semaphore facility provided in <b class="library">semLib</b>.</p><dd><p class="Body"><a name="85106"> </a>In addition to the routines that implement the seven basic I/O functions, drivers also have three other routines:</p></dl><dl class="margin"><p class="listspace"><ul class="Bullet" type="disc"><li><a name="85107"> </a>An initialization routine that installs the driver in the I/O system, connects to any interrupts used by the devices serviced by the driver, and performs any necessary hardware initialization (typically named <i class="textVariable">xx</i><b class="routine"><i class="routine">Drv</i></b><b>(</b>&nbsp;<b>)</b>).</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="85109"> </a>A routine to add devices that are to be serviced by the driver (typically named <i class="textVariable">xx</i><b class="routine"><i class="routine">DevCreate</i></b><b>(</b>&nbsp;<b>)</b>) to the I/O system.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="85111"> </a>Interrupt-level routines that are connected to the interrupts of the devices serviced by the driver.</li></ul></p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="85114">The Driver Table and Installing Drivers</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85115"> </a>The function of the I/O system is to route user I/O requests to the appropriate routine of the appropriate driver. The I/O system does this by maintaining a table that contains the address of each routine for each driver. Drivers are installed dynamically by calling the I/O system internal routine <b class="routine"><i class="routine">iosDrvInstall</i></b><b>(</b>&nbsp;<b>)</b>. The arguments to this routine are the addresses of the seven I/O routines for the new driver. The <b class="routine"><i class="routine">iosDrvInstall</i></b><b>(</b>&nbsp;<b>)</b> routine enters these addresses in a free slot in the driver table and returns the index of this slot. This index is known as the <i class="term">driver number</i> and is used subsequently to associate particular devices with the driver.</p><dd><p class="Body"><a name="85118"> </a>Null (0) addresses can be specified for some of the seven routines. This indicates that the driver does not process those functions. For non-file-system drivers, <b class="routine"><i class="routine">close</i></b><b>(</b>&nbsp;<b>)</b> and <b class="routine"><i class="routine">remove</i></b><b>(</b>&nbsp;<b>)</b> often do nothing as far as the driver is concerned. </p><dd><p class="Body"><a name="85121"> </a>VxWorks file systems (<b class="library">dosFsLib</b>, <b class="library">rt11FsLib</b>, and <b class="library">rawFsLib</b>) contain their own entries in the driver table, which are created when the file system library is initialized.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="85122">Example of Installing a Driver</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85126"> </a><a href="c-iosys9.html#89802">Figure&nbsp;3-2</a> shows the actions taken by the example driver and by the I/O system when the initialization routine <i class="textVariable">xx</i><b class="routine"><i class="routine">Drv</i></b><b>(</b>&nbsp;<b>)</b> runs.</p><dl class="margin">

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人精品二区三区99精品| 欧美综合天天夜夜久久| 欧美日韩夫妻久久| 国产日韩欧美综合在线| 五月婷婷另类国产| 成人av在线网站| 久久综合五月天婷婷伊人| 香蕉影视欧美成人| 一本色道久久综合亚洲91 | 97精品久久久久中文字幕| 日韩欧美第一区| 午夜久久电影网| 日本韩国欧美一区| 国产精品家庭影院| 国产91精品露脸国语对白| 日韩你懂的在线观看| 婷婷久久综合九色综合绿巨人| 91视频你懂的| 国产精品不卡在线观看| 国产乱人伦精品一区二区在线观看| 日韩一区二区三区在线视频| 丝袜美腿高跟呻吟高潮一区| 在线日韩av片| 樱桃国产成人精品视频| 99国产欧美另类久久久精品| 国产精品热久久久久夜色精品三区| 国产揄拍国内精品对白| 日韩美女一区二区三区| 蜜桃视频免费观看一区| 欧美一区二区三区在线| 日韩av一区二区在线影视| 欧美精品日韩精品| 亚洲成人av在线电影| 欧美日韩一区二区在线视频| 亚洲高清视频在线| 欧美日本在线一区| 视频一区二区欧美| 91精品婷婷国产综合久久 | 国产精品久久久爽爽爽麻豆色哟哟| 韩国午夜理伦三级不卡影院| 日韩免费高清视频| 精品一区二区综合| 久久综合色综合88| 国产精品一区二区久激情瑜伽| 久久综合狠狠综合久久激情| 国产一区二区伦理片| 久久在线观看免费| 国产成人免费高清| 国产精品国产三级国产aⅴ中文| 成人av在线一区二区三区| 一色桃子久久精品亚洲| 日本乱人伦aⅴ精品| 樱花影视一区二区| 在线成人午夜影院| 久久精品国产在热久久| 国产视频一区二区在线| 北岛玲一区二区三区四区| 亚洲色图.com| 欧美日韩国产在线播放网站| 蜜臀久久久99精品久久久久久| 日韩午夜激情av| 国产精品18久久久久| 久久九九久精品国产免费直播| 99免费精品在线| 无码av免费一区二区三区试看| 欧美一二三四在线| 国内外精品视频| 中文字幕一区免费在线观看| 在线精品观看国产| 日韩av中文在线观看| 日本一区免费视频| 91黄色免费看| 久久精品久久久精品美女| 国产精品美女一区二区三区| 在线观看日韩一区| 极品尤物av久久免费看| 中文字幕一区三区| 日韩一区二区在线观看视频 | 日本不卡在线视频| 久久免费午夜影院| 色综合久久88色综合天天6 | 亚洲最新在线观看| 日韩欧美一区二区免费| 不卡视频免费播放| 日韩中文字幕亚洲一区二区va在线| 精品久久国产老人久久综合| 99久久精品国产一区| 精品成人a区在线观看| 亚洲午夜视频在线观看| 国产伦精品一区二区三区免费 | 91久久国产综合久久| 日韩国产在线一| 欧美高清在线视频| 欧美日本精品一区二区三区| 国产一区二区三区在线观看精品| 亚洲精品一二三区| 欧美精品一区二区三区四区| 91免费视频观看| 精品一区二区三区免费毛片爱| 亚洲欧美一区二区视频| 日韩一区二区电影在线| 91在线观看美女| 黑人巨大精品欧美黑白配亚洲| 亚洲品质自拍视频| 久久这里都是精品| 欧美精品乱人伦久久久久久| www.亚洲人| 国产一区二区三区香蕉| 天堂在线亚洲视频| 亚洲女人的天堂| 国产夜色精品一区二区av| 欧美久久久久久久久| 99久久精品免费| 国产精品乡下勾搭老头1| 天天影视色香欲综合网老头| 最新国产の精品合集bt伙计| 久久伊人蜜桃av一区二区| 欧美理论片在线| 91麻豆免费看片| 国产成人精品免费| 精品亚洲欧美一区| 天天影视涩香欲综合网| 亚洲精品视频在线| 国产精品网曝门| 26uuu久久综合| 欧美一区二区高清| 欧美亚洲国产一区二区三区va| 不卡电影免费在线播放一区| 精品亚洲porn| 美女任你摸久久| 亚洲bt欧美bt精品| 亚洲精品国产高清久久伦理二区 | 欧美天天综合网| 色欲综合视频天天天| 成人午夜在线播放| 国产麻豆成人精品| 国产在线精品视频| 精品影视av免费| 久久er精品视频| 免费在线观看一区| 日韩精品视频网站| 亚洲国产日韩av| 亚洲一区二区综合| 一区二区三区91| 艳妇臀荡乳欲伦亚洲一区| 一区二区三区精品视频| 最好看的中文字幕久久| 自拍av一区二区三区| 国产精品的网站| 成人免费在线视频| 自拍偷拍亚洲欧美日韩| 亚洲图片另类小说| 亚洲三级理论片| 亚洲男人天堂av| 亚洲免费在线视频一区 二区| 亚洲视频在线一区| 一区二区三区四区av| 一区二区三区不卡视频在线观看| 亚洲制服丝袜av| 亚洲午夜影视影院在线观看| 亚洲国产精品影院| 三级久久三级久久| 奇米综合一区二区三区精品视频| 免费国产亚洲视频| 国产又粗又猛又爽又黄91精品| 国产精品69毛片高清亚洲| 国产黄人亚洲片| aaa亚洲精品一二三区| 色综合久久久久久久久久久| 欧美视频在线一区二区三区| 欧美精品少妇一区二区三区| 日韩精品中文字幕在线不卡尤物 | 日韩一级欧美一级| 日韩欧美国产1| 日本一区二区三区久久久久久久久不| 国产日韩v精品一区二区| 国产精品久久久爽爽爽麻豆色哟哟| 亚洲天堂2016| 五月天激情小说综合| 精品一区二区三区影院在线午夜| 国产传媒一区在线| 91在线观看美女| 在线不卡免费欧美| 精品日韩一区二区| 中文字幕一区二区三区色视频| 亚洲综合色成人| 美女久久久精品| 99热在这里有精品免费| 欧美日韩黄色影视| 久久久久久久久一| 亚洲精品日日夜夜| 日韩高清电影一区| 国产成人综合在线| 日本电影欧美片| 日韩精品影音先锋| 一色桃子久久精品亚洲| 青娱乐精品视频| 成人久久久精品乱码一区二区三区| 欧美三级蜜桃2在线观看| 精品国产电影一区二区|