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

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

?? c-iosys9.html

?? this about vxworks operations systems
?? HTML
?? 第 1 頁 / 共 5 頁
字號:
<p class="listspace"><ul class="Bullet" type="disc"><li><a name="85699"> </a>The tasks want to specify a timeout to wait for I/O from the device. For example, a task might want to time out on a UDP socket if the packet never arrives.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="85700"> </a>The driver supports multiple devices, and the tasks want to wait simultaneously for any number of them. For example, multiple pipes might be used for different data priorities.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="85701"> </a>The tasks want to wait for I/O from the device while also waiting for I/O from another device. For example, a server task might use both pipes and sockets.</li></ul></p></dl><dl class="margin"><dd><p class="Body"><a name="85702"> </a>To implement <b class="routine"><i class="routine">select</i></b><b>(</b>&nbsp;<b>)</b>, the driver must keep a list of tasks waiting for device activity. When the device becomes ready, the driver unblocks all the tasks waiting on the device. </p><dd><p class="Body"><a name="85703"> </a>For a device driver to support <b class="routine"><i class="routine">select</i></b><b>(</b>&nbsp;<b>)</b>, it must declare a <b class="symbol_UC">SEL_WAKEUP_LIST</b> structure (typically declared as part of the device descriptor structure) and initialize it by calling <b class="routine"><i class="routine">selWakeupListInit</i></b><b>(</b>&nbsp;<b>)</b>. This is done in the driver's <i class="textVariable">xx</i><b class="routine"><i class="routine">DevCreate</i></b><b>(</b>&nbsp;<b>)</b> routine. When a task calls <b class="routine"><i class="routine">select</i></b><b>(</b>&nbsp;<b>)</b>, <b class="library">selectLib</b> calls the driver's <b class="routine"><i class="routine">ioctl</i></b><b>(</b>&nbsp;<b>)</b> routine with the function <b class="symbol_UC">FIOSELECT</b> or <b class="symbol_UC">FIOUNSELECT</b>. If <b class="routine"><i class="routine">ioctl</i></b><b>(</b>&nbsp;<b>)</b> is called with <b class="symbol_UC">FIOSELECT,</b> the driver must do the following:</p></dl><dl class="margin"><p><ol class="List"><li value="1."><a name="85708"> </a>Add the<b class="symbol_UC"> SEL_WAKEUP_NODE</b> (provided as the third argument of <b class="routine"><i class="routine">ioctl</i></b><b>(</b>&nbsp;<b>)</b>) to the <b class="symbol_UC">SEL_WAKEUP_LIST</b> by calling <b class="routine"><i class="routine">selNodeAdd</i></b><b>(</b>&nbsp;<b>)</b>.</li></ol></p><p><ol class="List"><li value="2."><a name="85712"> </a>Use the routine <b class="routine"><i class="routine">selWakeupType</i></b><b>(</b>&nbsp;<b>)</b> to check whether the task is waiting for data to read from the device (<b class="symbol_UC">SELREAD</b>) or if the device is ready to be written (<b class="symbol_UC">SELWRITE</b>). </li></ol></p><p><ol class="List"><li value="3."><a name="85713"> </a>If the device is ready (for reading or writing as determined by <b class="routine"><i class="routine">selWakeupType</i></b><b>(</b>&nbsp;<b>)</b>), the driver calls the routine <b class="routine"><i class="routine">selWakeup</i></b><b>(</b>&nbsp;<b>)</b> to make sure that the <b class="routine"><i class="routine">select</i></b><b>(</b>&nbsp;<b>)</b> call in the task does not pend. This avoids the situation where the task is blocked but the device is ready.</li></ol></p></dl><dl class="margin"><dd><p class="Body"><a name="85716"> </a>If <b class="routine"><i class="routine">ioctl</i></b><b>(</b>&nbsp;<b>)</b> is called with <b class="symbol_UC">FIOUNSELECT</b>, the driver calls <b class="routine"><i class="routine">selNodeDelete</i></b><b>(</b>&nbsp;<b>)</b> to remove the provided <b class="symbol_UC">SEL_WAKEUP_NODE</b> from the wakeup list.</p><dd><p class="Body"><a name="85718"> </a>When the device becomes available, <b class="routine"><i class="routine">selWakeupAll</i></b><b>(</b>&nbsp;<b>)</b> is used to unblock all the tasks waiting on this device. Although this typically occurs in the driver's ISR, it can also occur elsewhere. For example, a pipe driver might call <b class="routine"><i class="routine">selWakeupAll</i></b><b>(</b>&nbsp;<b>)</b> from its<b class="routine"><i class="routine"> </i></b><i class="textVariable">xx</i><b class="routine"><i class="routine">Read</i></b><b>(</b>&nbsp;<b>)</b> routine to unblock all the tasks waiting to write, now that there is room in the pipe to store the data. Similarly the pipe's <i class="textVariable">xx</i><b class="routine"><i class="routine">Write</i></b><b>(</b>&nbsp;<b>)</b> routine might call<b class="routine"><i class="routine"> selWakeupAll</i></b><b>(</b>&nbsp;<b>)</b> to unblock all the tasks waiting to read, now that there is data in the pipe.</p></dl></dl><h4 class="EntityTitle"><a name="85720"><font face="Helvetica, sans-serif" size="-1" class="sans">Example 3-10:&nbsp;&nbsp;Driver Code Using the Select Facility</font></a></h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="85721">/* This code fragment shows how a driver might support select(). In this   * example, the driver unblocks tasks waiting for the device to become ready   * in its interrupt service routine.  */</a></b><dd> <b><a name="85723">/* myDrvLib.h - header file for driver */</a></b><dd> <b><a name="85725">typedef struct     /* MY_DEV */     {     DEV_HDR     devHdr;      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* device header */     BOOL       myDrvDataAvailable; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* data is available to read */     BOOL       myDrvRdyForWriting; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* device is ready to write */     SEL_WAKEUP_LIST selWakeupList;  &nbsp;&nbsp;&nbsp;&nbsp;/* list of tasks pended in select */     } MY_DEV;</a></b></pre></dl><dl class="margin"><dd><hr class="Line"></dl><dl class="margin"><dd><pre class="Code"><b><a name="97661">/* myDrv.c - code fragments for supporting select() in a driver */</a></b><dd> <b><a name="85735">#include "vxWorks.h" #include "selectLib.h"</a></b><dd> <b><a name="93728">/* First create and initialize the device */  STATUS myDrvDevCreate     (     char *  name,  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* name of device to create */     )     {     MY_DEV * pMyDrvDev; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* pointer to device descriptor*/     ... <i class="i">additional driver code</i> ...      /* allocate memory for MY_DEV */     pMyDrvDev = (MY_DEV *) malloc (sizeof MY_DEV);     ... <i class="i">additional driver code</i> ...</a></b><dd> <b><a name="96536">    /* initialize MY_DEV */     pMyDrvDev-&gt;myDrvDataAvailable=FALSE     pMyDrvDev-&gt;myDrvRdyForWriting=FALSE</a></b><dd> <b><a name="85753">    /* initialize wakeup list */     selWakeupListInit (&amp;pMyDrvDev-&gt;selWakeupList);     ... <i class="i">additional driver code</i> ...     }</a></b><dd> <b><a name="97446">/* ioctl function to request reading or writing */  STATUS myDrvIoctl     (     MY_DEV * pMyDrvDev,   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* pointer to device descriptor */     int    &nbsp;&nbsp;request,   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* ioctl function */     int &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arg     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* where to send answer */     )     {     ... <i class="i">additional driver code</i> ...</a></b><dd> <b><a name="85769">    switch (request)         {         ... <i class="i">additional driver code</i> ...</a></b><dd> <b><a name="85774">        case FIOSELECT:</a></b><dd> <b><a name="85775">            /* add node to wakeup list */</a></b><dd> <b><a name="85776">            selNodeAdd (&amp;pMyDrvDev-&gt;selWakeupList, (SEL_WAKEUP_NODE *) arg);</a></b><dd> <b><a name="85778">            if (selWakeupType ((SEL_WAKEUP_NODE *) arg) == SELREAD                  &amp;&amp; pMyDrvDev-&gt;myDrvDataAvailable)                 {                 /* data available, make sure task does not pend */                 selWakeup ((SEL_WAKEUP_NODE *) arg);                 }             if (selWakeupType ((SEL_WAKEUP_NODE *) arg) == SELWRITE                  &amp;&amp; pMyDrvDev-&gt;myDrvRdyForWriting)                 {                 /* device ready for writing, make sure task does not pend */                 selWakeup ((SEL_WAKEUP_NODE *) arg);                 }             break;</a></b><dd> <b><a name="85788">        case FIOUNSELECT:</a></b><dd> <b><a name="85789">            /* delete node from wakeup list */             selNodeDelete (&amp;pMyDrvDev-&gt;selWakeupList, (SEL_WAKEUP_NODE *) arg);             break;</a></b><dd> <b><a name="85792">            ... <i class="i">additional driver code</i> ...         }     }</a></b><dd> <b><a name="85796">/* code that actually uses the select() function to read or write */  void myDrvIsr     (     MY_DEV * pMyDrvDev;     )     {     ... <i class="i">additional driver code</i> ...</a></b><dd> <b><a name="85803">    /* if there is data available to read, wake up all pending tasks */</a></b><dd> <b><a name="96082">    if (pMyDrvDev-&gt;myDrvDataAvailable)         selWakeupAll (&amp;pMyDrvDev-&gt;selWakeupList, SELREAD);</a></b><dd> <b><a name="85807">    /* if the device is ready to write, wake up all pending tasks */</a></b><dd> <b><a name="93887">    if (pMyDrvDev-&gt;myDrvRdyForWriting)         selWakeupAll (&amp;pMyDrvDev-&gt;selWakeupList, SELWRITE);     }</a></b></pre></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="85815">Cache Coherency</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85817"> </a>Drivers written for boards with caches must guarantee <i class="term">cache coherency</i>. Cache coherency means data in the cache must be in sync, or coherent, with data in RAM. The data cache and RAM can get out of sync any time there is asynchronous access to RAM (for example, DMA device access or VMEbus access). Data caches are used to increase performance by reducing the number of memory accesses. <a href="c-iosys9.html#85847">Figure&nbsp;3-7</a> shows the relationships between the CPU, data cache, RAM, and a DMA device.</p><dd><p class="Body"><a name="85823"> </a>Data caches can operate in one of two modes: <i class="term">writethrough</i> and <i class="term">copyback</i>. Write-through mode writes data to both the cache and RAM; this guarantees cache coherency on output but not input. Copyback mode writes the data only to the cache; this makes cache coherency an issue for both input and output of data. <div class="frame"><h4 class="EntityTitle"><a name="85847"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure 3-7:&nbsp;&nbsp;Cache Coherency</font></a></h4><dl class="margin"><div class="CellBody"><a name="85844"> </a><img class="figure" border="0" src="images/c-iosysa7.gif">&nbsp;</div></dl></div></p><dd><p class="Body"><a name="85848"> </a>If a CPU writes data to RAM that is destined for a DMA device, the data can first be written to the data cache. When the DMA device transfers the data from RAM, there is no guarantee that the data in RAM was updated with the data in the cache. Thus, the data output to the device may not be the most recent--the new data may still be sitting in the cache. This data incoherency can be solved by making sure the data cache is flushed to RAM before the data is transferred to the DMA device.</p><dd><p class="Body"><a name="85849"> </a>If a CPU reads data from RAM that originated from a DMA device, the data read can be from the cache buffer (if the cache buffer for this data is not marked invalid) and not the data just transferred from the device to RAM. The solution to this data incoherency is to make sure that the cache buffer is marked invalid so that the data is read from RAM and not from the cache.</p><dd><p class="Body"><a name="85850"> </a>Drivers can solve the cache coherency problem either by allocating cache-safe buffers (buffers that are marked non-cacheable) or flushing and invalidating cache entries any time the data is written to or read from the device. Allocating cache-safe buffers is useful for static buffers; however, this typically requires MMU support. Non-cacheable buffers that are allocated and freed frequently (dynamic buffers) can result in large amounts of memory being marked non-cacheable. An alternative to using non-cacheable buffers is to flush and invalidate cache entries manually; this allows dynamic buffers to be kept coherent.</p><dd><p class="Body"><a name="85851"> </a>The routines <b class="routine"><i class="routine">cacheFlush</i></b><b>(</b>&nbsp;<b>)</b> and <b class="routine"><i class="routine">cacheInvalidate</i></b><b>(</b>&nbsp;<b>)</b> are used to manually flush and invalidate cache buffers. Before a device reads the data, flush the data from the cache to RAM using <b class="routine"><i class="routine">cacheFlush</i></b><b>(</b>&nbsp;<b>)</b> to ensure the device reads current data. After the device has written the data into RAM, invalidate the cache entry with <b class="routine"><i class="routine">cacheInvalidate</i></b><b>(</b>&nbsp;<b>)</b>. This guarantees that when the data is read by the CPU, the cache is updated with the new data in RAM.</p></dl></dl><h4 class="EntityTitle"><a name="85857"><font face="Helvetica, sans-serif" size="-1" class="sans">Example 3-11:&nbsp;&nbsp;DMA Transfer Routine </font></a></h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="85858">/* This a sample DMA transfer routine. Before programming the device to   * output the data to the device, it flushes the cache by calling   * cacheFlush(). On a read, after the device has transferred the data, the   * cache entry must be invalidated using cacheInvalidate().  */</a></b><dd> <b><a name="85860">#include "vxWorks.h" #include "cacheLib.h" #include "fcntl.h" #include "example.h" void exampleDmaTransfer   /* 1 = READ, 0 = WRITE */     (     UINT8 *pExampleBuf,     int exampleBufLen, 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
制服丝袜一区二区三区| 国产酒店精品激情| 91精品91久久久中77777| 91麻豆精品国产91久久久| 国产亚洲精品福利| 狠狠色狠狠色综合| 宅男噜噜噜66一区二区66| 最新不卡av在线| 国产一区二区91| 久久尤物电影视频在线观看| 日韩国产欧美在线视频| 欧美精品高清视频| 丝袜a∨在线一区二区三区不卡| 欧美亚洲另类激情小说| 1024成人网色www| 激情综合色综合久久| 豆国产96在线|亚洲| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 一区精品在线播放| 成人精品电影在线观看| 欧美xxxxx牲另类人与| 国内外成人在线| 久久午夜老司机| 免费黄网站欧美| 2022国产精品视频| 成人精品免费看| 亚洲久草在线视频| 色噜噜狠狠一区二区三区果冻| 亚洲成人综合在线| 色婷婷综合五月| 亚洲欧美日韩国产手机在线| 色系网站成人免费| 亚洲欧洲成人自拍| 欧美四级电影网| 日本乱码高清不卡字幕| 婷婷国产v国产偷v亚洲高清| 3751色影院一区二区三区| 美女国产一区二区三区| 国产拍揄自揄精品视频麻豆| 99精品偷自拍| 丝袜美腿亚洲一区| 亚洲免费观看高清完整版在线 | 秋霞国产午夜精品免费视频| 久久色中文字幕| 91免费版在线| 蜜臀久久99精品久久久久久9 | 国产激情91久久精品导航| 亚洲女与黑人做爰| 精品国产乱码久久久久久久| 99久久精品久久久久久清纯| 日本在线不卡视频| 亚洲综合激情网| 久久久91精品国产一区二区三区| 亚洲激情中文1区| 欧美日韩视频专区在线播放| 国产一区在线不卡| 亚洲福中文字幕伊人影院| 国产欧美一二三区| 91精品欧美久久久久久动漫| 在线观看免费成人| 91视频在线观看| 成人免费视频视频在线观看免费| 精品国产一区久久| 91久久一区二区| 成人性生交大片免费看在线播放| 久久亚洲二区三区| 欧美日韩日日骚| 国产精品你懂的| 日韩午夜电影av| 精品精品国产高清a毛片牛牛 | 亚洲综合色区另类av| 国产欧美精品在线观看| 精品国产伦一区二区三区观看方式 | 日本不卡免费在线视频| 国产色婷婷亚洲99精品小说| 色呦呦一区二区三区| 高清不卡在线观看av| 国产九九视频一区二区三区| 免费在线观看精品| 久久精品国产77777蜜臀| 亚洲成人激情自拍| 日韩av午夜在线观看| 亚洲成人免费观看| 午夜精品久久久久影视| 欧美日韩在线播放| 欧美片网站yy| 欧美v亚洲v综合ⅴ国产v| 国产偷国产偷精品高清尤物 | 免费成人av在线播放| 成人午夜免费av| 91国偷自产一区二区三区观看| 日韩欧美一区二区视频| 激情综合五月婷婷| 麻豆精品视频在线观看视频| 国产一区二区视频在线| 成人深夜在线观看| 欧美日韩不卡一区二区| 精品国精品国产| 国产精品看片你懂得| 亚洲日本免费电影| 亚洲国产va精品久久久不卡综合| 欧美日韩久久久一区| 欧美日韩久久一区二区| 国产午夜精品久久久久久久| 一区二区不卡在线播放 | 久久精品视频免费观看| 亚洲高清不卡在线观看| 男人操女人的视频在线观看欧美| 亚洲欧美日韩久久精品| 美女脱光内衣内裤视频久久网站| 中文字幕在线视频一区| 日韩精品一二三四| 91香蕉视频mp4| 精品亚洲国内自在自线福利| 成人黄色软件下载| 欧美成人女星排行榜| 一区二区理论电影在线观看| 国产精品白丝av| 94-欧美-setu| 久久综合久久综合久久综合| 亚洲在线视频一区| 成人免费三级在线| 久久午夜羞羞影院免费观看| 日韩不卡在线观看日韩不卡视频| 性欧美疯狂xxxxbbbb| 国产精品一区二区91| 久久综合999| 精品一区二区三区视频在线观看| 免费观看日韩电影| 欧美日韩一级片在线观看| 国产日韩精品一区| 久久精品久久精品| 欧美日韩高清一区二区| 亚洲一区二区三区中文字幕在线 | 精品一区二区三区欧美| 91精品国产aⅴ一区二区| 欧美激情综合五月色丁香小说| 337p日本欧洲亚洲大胆精品 | 成人av资源网站| 久久综合色综合88| 国产精品一区专区| 国产精品久久久久一区| 国产电影一区在线| 中文字幕的久久| 欧美无砖砖区免费| 青青草成人在线观看| 日韩午夜精品电影| 国产麻豆视频一区二区| 国产精品国产三级国产aⅴ原创| 欧美日韩国产综合视频在线观看| eeuss鲁片一区二区三区在线观看| 成人免费高清视频在线观看| 欧美国产精品一区二区| 99综合影院在线| 午夜视频一区在线观看| 日韩免费一区二区| 99re热这里只有精品视频| 美女看a上一区| 一区二区欧美视频| 久久精品一区二区| 欧美视频日韩视频| 国产高清久久久久| 日韩av一区二区在线影视| 国产欧美视频一区二区| 欧美一区二区三区在线视频| 91网站最新地址| 国产一区二区三区免费观看| 成人免费视频在线观看| 久久综合五月天婷婷伊人| 日韩一级大片在线| 中文字幕一区二区三区av| 538prom精品视频线放| 91丝袜高跟美女视频| 久久99精品国产| 亚洲在线视频网站| 中文字幕精品一区二区精品绿巨人| 奇米影视一区二区三区| 久久久国产精华| 欧美亚洲综合网| 色综合天天综合在线视频| 久久99精品久久久久久国产越南 | 日本韩国欧美三级| 精品一区二区av| 日韩国产欧美在线观看| 日韩久久一区二区| 精品久久一区二区| 精品免费视频.| 久久精品视频网| 国产亚洲精品资源在线26u| 日韩一区国产二区欧美三区| 欧美一区二区三区在线| 欧美性一级生活| 色综合欧美在线视频区| 99久久精品情趣| 国产aⅴ综合色| 高清在线成人网| 成人黄色网址在线观看| proumb性欧美在线观看| 色婷婷综合视频在线观看| 欧美天堂一区二区三区|