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

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

?? c-smo2.html

?? this about vxworks operations systems
?? HTML
?? 第 1 頁 / 共 5 頁
字號:
<table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="84534"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Create Routine</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="84536"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Description</font></b></div></th></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84539"> </a><b class="routine"><i class="routine">semBSmCreate</i></b><b>(&nbsp;)</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84541"> </a>Create a shared binary semaphore.&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84544"> </a><b class="routine"><i class="routine">semCSmCreate</i></b><b>(&nbsp;)</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84546"> </a>Create a shared counting semaphore.&nbsp;</div></td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p><dd><p class="Body"><a name="84548"> </a>The use of shared semaphores and local semaphores differs in several ways:</p></dl><dl class="margin"><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84549"> </a>The shared semaphore queuing order specified when the semaphore is created must be FIFO. <a href="c-smo2.html#84558">Figure&nbsp;6-1</a> shows two tasks executing on different CPUs, both trying to take the same semaphore. Task 1 executes first, and is put at the front of the queue because the semaphore is unavailable (empty). Task 2 (executing on a different CPU) tries to take the semaphore after task 1's attempt and is put on the queue behind task 1.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84553"> </a>Shared semaphores <i class="emphasis">cannot </i>be given from interrupt level. </li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="84554"> </a>Shared semaphores cannot be deleted. Attempts to delete a shared semaphore return <b class="symbol_UC">ERROR</b> and set <b class="symbol_lc">errno</b> to <b class="symbol_UC">S_smObjLib_NO_OBJECT_DESTROY</b>. <div class="frame"><h4 class="EntityTitle"><a name="84558"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure 6-1:&nbsp;&nbsp;Shared Semaphore Queues</font></a></h4><dl class="margin"><div class="Anchor"><a name="84606"> </a><img class="figure" border="0" src="images/c-smo0.gif"></div></dl></div></li></ul></p></dl><dl class="margin"><dd><p class="Body"><a name="84608"> </a>Use <b class="routine"><i class="routine">semInfo</i></b><b>(</b>&nbsp;<b>)</b> to get the shared task control block of tasks pended on a shared semaphore. Use <b class="routine"><i class="routine">semShow</i></b><b>(</b>&nbsp;<b>)</b>, if <b class="symbol_UC">INCLUDE_SEM_SHOW</b> is included in the project facility VxWorks view, to display the status of the shared semaphore and a list of pended tasks. The following example displays detailed information on the shared semaphore <b class="symbol_lc">mySmSemaphoreId</b> as indicated by the second argument (0 = summary, 1 = details):</p><dl class="margin"><dd><pre class="Code2"><b><a name="84611"></b><tt class="output">-&gt;</tt><b> semShow mySmSemaphoreId, 1  </b><tt class="output">value = 0 = 0x0</tt><b></a></b></pre></dl><dd><p class="Body"><a name="84612"> </a>The output is sent to the standard output device, and looks like the following:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84613"></b><tt class="output">Semaphore&nbsp;Id&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;0x36431d Semaphore&nbsp;Type&nbsp;&nbsp;:&nbsp;SHARED BINARY Task&nbsp;Queuing&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;FIFO Pended&nbsp;Tasks&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;2 State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;EMPTY TID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CPU&nbsp;Number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Shared TCB -------------&nbsp;-------------&nbsp;-------------- 0xd0618&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x364204 0x3be924&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x36421c</tt><b> </a></b></pre></dl></dl></dl><h4 class="EntityTitle"><a name="84623"><font face="Helvetica, sans-serif" size="-1" class="sans">Example 6-1:&nbsp;&nbsp;Shared Semaphores </font></a></h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84624"> </a>The following code example depicts two tasks executing on different CPUs and using shared semaphores. The routine <b class="routine"><i class="routine">semTask1</i></b><b>(</b>&nbsp;<b>) </b>creates the shared semaphore, initializing the state to full. It adds the semaphore to the name database (to enable the task on the other CPU to access it), takes the semaphore, does some processing, and gives the semaphore. The routine <b class="routine"><i class="routine">semTask2</i></b><b>(</b>&nbsp;<b>)</b> gets the semaphore ID from the database, takes the semaphore, does some processing, and gives the semaphore.</p></dl><dl class="margin"><dd><hr class="Line"></dl><dl class="margin"><dd><pre class="Code"><b><a name="84626">/* semExample.h - shared semaphore example header file */  #define SEM_NAME "mySmSemaphore"  /* semTask1.c - shared semaphore example */  /* This code is executed by a task on CPU #1 */  #include "vxWorks.h" #include "semLib.h" #include "semSmLib.h" #include "smNameLib.h" #include "stdio.h" #include "taskLib.h" #include "semExample.h"</a></b><dd> <b><a name="84642">/************************************************************************ * * semTask1 - shared semaphore user  */  STATUS semTask1 (void)     {     SEM_ID semSmId;      /* create shared semaphore */      if ((semSmId = semBSmCreate (SEM_Q_FIFO, SEM_FULL)) == NULL)         return (ERROR);</a></b><dd> <b><a name="86707">    /* add object to name database */      if (smNameAdd (SEM_NAME, semSmId, T_SM_SEM_B) == ERROR)         return (ERROR);      /* grab shared semaphore and hold it for awhile */      semTake (semSmId, WAIT_FOREVER);</a></b><dd> <b><a name="84665">    /* normally do something useful */      printf ("Task1 has the shared semaphore\n");     taskDelay (sysClkRateGet () * 5);     printf ("Task1 is releasing the shared semaphore\n");</a></b><dd> <b><a name="84671">    /* release shared semaphore */      semGive (semSmId);      return (OK);     }</a></b></pre></dl><dl class="margin"><dd><hr class="Line"></dl><dl class="margin"><dd><pre class="Code"><b><a name="84678">/* semTask2.c - shared semaphore example */</a></b><dd> <b><a name="84680">/* This code is executed by a task on CPU #2. */</a></b><dd> <b><a name="84682">#include "vxWorks.h" #include "semLib.h" #include "semSmLib.h"</a></b><dd> <b><a name="84683">#include "smNameLib.h" #include "stdio.h" #include "semExample.h"</a></b><dd> <b><a name="84685">/************************************************************************ * * semTask2 - shared semaphore user  */</a></b><dd> <b><a name="84690">STATUS semTask2 (void)     {     SEM_ID&nbsp;semSmId;     int&nbsp;&nbsp;&nbsp;&nbsp;objType;</a></b><dd> <b><a name="84695">    /* find object in name database */      if (smNameFind (SEM_NAME, (void **) &amp;semSmId, &amp;objType, WAIT_FOREVER)         == ERROR)         return (ERROR);</a></b><dd> <b><a name="84701">    /* take the shared semaphore */      printf ("semTask2 is now going to take the shared semaphore\n");     semTake (semSmId, WAIT_FOREVER);</a></b><dd> <b><a name="84706">    /* normally do something useful */      printf ("Task2 got the shared semaphore!!\n");</a></b><dd> <b><a name="84710">    /* release shared semaphore */      semGive (semSmId);      printf ("Task2 has released the shared semaphore\n");      return (OK);     }</a></b></pre></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="84719">6.2.3  &nbsp;&nbsp;Shared Message Queues</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84722"> </a><b></b><i class="term">Shared message queues</i><b></b> are FIFO queues used by tasks to send and receive variable-length messages on any of the CPUs that have access to the shared memory. They can be used either to synchronize tasks or to exchange data between tasks running on different CPUs. See <a href="c-basic.html#83550"><i class="title">2.&nbsp;Basic OS</i></a> in this manual and the reference entry for <b class="library">msgQLib</b> for a complete discussion of message queues.</p><dd><p class="Body"><a name="84726"> </a>To use a shared message queue, a task creates the message queue and advertises its ID. A task that wants to send or receive a message with this message queue first gets the message queue's ID. It then uses this ID to access the message queue. </p><dd><p class="Body"><a name="84727"> </a>For example, consider a typical server/client scenario where a server<b class="task"> </b>task <b class="task">t1</b> (on CPU 1) reads requests from one message queue and replies to these requests with a different message queue. Task<b class="task"> t1</b> creates the request queue and advertises its ID by adding it to the name database assigning the name <b class="symbol_lc">requestQue</b>. If task<b class="task"> t2</b> (on CPU 0) wants to send a request to<b class="task"> t1</b>, it first gets the message queue ID by looking up the name <b class="symbol_lc">requestQue</b> in the name database. Before sending its first request, task<b class="task"> t2</b> creates a reply message queue. Instead of adding its ID to the database, it advertises the ID by sending it as part of the request message. When <b class="task">t1 </b>receives the request from the client, it finds in the message the ID of the queue to use when replying to that client. Task<b class="task"> t1 </b>then sends the reply to the client by using this ID.</p><dd><p class="Body"><a name="84728"> </a>To pass messages between tasks on different CPUs, first create the message queue by calling <b class="routine"><i class="routine">msgQSmCreate</i></b><b>(</b>&nbsp;<b>)</b><b class="routine"><i class="routine"></i></b>. This routine returns a <b class="symbol_UC">MSG_Q_ID</b>. This ID is used for sending and receiving messages on the shared message queue.</p><dd><p class="Body"><a name="84732"> </a>Like their local counterparts, shared message queues can send both urgent or normal priority messages. </p><dd><p class="Body"><a name="84733"> </a>The use of shared message queues and local message queues differs in several ways:</p></dl><dl class="margin">

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色视频欧美一区二区三区| 午夜久久福利影院| 国产精品国产三级国产aⅴ入口| 99国产欧美另类久久久精品| 老司机精品视频在线| 亚洲精品国产精华液| 久久综合久久久久88| 精品免费99久久| 欧美综合欧美视频| 欧美性感一类影片在线播放| 色综合一个色综合| 欧美片网站yy| 欧美一区三区四区| 欧美mv和日韩mv的网站| 久久品道一品道久久精品| 精品国产一区二区三区四区四| 日韩免费观看高清完整版在线观看| 欧美mv日韩mv| 国产精品国产三级国产专播品爱网| 亚洲婷婷综合色高清在线| 亚洲精品中文在线观看| 亚洲影院理伦片| 久久激情五月婷婷| 99视频一区二区| 欧美日韩免费电影| 久久精子c满五个校花| 中文字幕在线一区二区三区| 亚洲高清视频在线| 成人免费视频免费观看| 99久久综合99久久综合网站| 91麻豆精品国产91久久久更新时间 | 欧美性猛交xxxx黑人交| 欧美喷潮久久久xxxxx| 精品国一区二区三区| 欧美国产日本韩| 一区二区三区不卡在线观看| 青草av.久久免费一区| 日本sm残虐另类| 国产在线播精品第三| 免费亚洲电影在线| 粉嫩av亚洲一区二区图片| 日韩国产精品91| 成人午夜免费av| 欧美日免费三级在线| 精品入口麻豆88视频| 国产精品二三区| 亚洲第一狼人社区| 国模少妇一区二区三区| 色哟哟在线观看一区二区三区| 91亚洲精品久久久蜜桃| 91精品国产综合久久蜜臀| 日本一区二区免费在线| 亚洲综合视频在线| 国产伦精品一区二区三区免费迷| 99精品国产热久久91蜜凸| 欧美亚洲愉拍一区二区| 精品国内片67194| 亚洲黄色小视频| 国产一区二区三区香蕉| 一本色道久久综合精品竹菊| 精品三级av在线| 亚洲一级在线观看| 99精品国产99久久久久久白柏| 91精品在线观看入口| 亚洲少妇屁股交4| 免费成人结看片| 欧美在线一区二区| 欧美韩国日本一区| 久久99精品久久久久| 欧美丝袜丝交足nylons| 国产欧美日韩另类一区| 久久精品国产99国产| 欧美日韩一区三区四区| 国产精品久久免费看| 国产乱码精品一区二区三区av| 国产成人精品亚洲日本在线桃色| 在线视频国产一区| 亚洲男人的天堂在线aⅴ视频| 国产米奇在线777精品观看| 555www色欧美视频| 一区二区三区在线观看动漫| 国产精品白丝av| 久久色.com| 久久精品99国产精品| 欧美一级高清片在线观看| 亚洲风情在线资源站| 欧美日韩一二三| 亚洲午夜激情网站| 欧美在线免费观看视频| 一区二区三区在线免费| 日本精品视频一区二区三区| 国产精品理论在线观看| va亚洲va日韩不卡在线观看| 中文字幕av资源一区| 美女诱惑一区二区| 日韩一级二级三级| 精品一区二区综合| 欧美精品一二三四| 免费一区二区视频| 欧美精品一区在线观看| 国产一二精品视频| 国产欧美视频一区二区| 成人白浆超碰人人人人| 亚洲区小说区图片区qvod| 日本高清成人免费播放| 精品亚洲国产成人av制服丝袜| 欧美一级黄色大片| 美日韩黄色大片| 亚洲精品亚洲人成人网在线播放| 色美美综合视频| 石原莉奈一区二区三区在线观看| 欧美美女直播网站| 美女网站在线免费欧美精品| 久久精品人人做人人综合| 91丨九色porny丨蝌蚪| 亚洲一区二区视频| 精品国产免费视频| 成人午夜在线视频| 日本不卡免费在线视频| 久久综合视频网| 91丝袜呻吟高潮美腿白嫩在线观看| 亚洲乱码日产精品bd| 91精品久久久久久久99蜜桃| 国产一二精品视频| 日韩毛片高清在线播放| 欧美高清你懂得| 精品在线免费视频| 国产欧美日韩另类视频免费观看| 91精品福利在线| 精品系列免费在线观看| 综合激情网...| 91超碰这里只有精品国产| 成人黄页毛片网站| 蜜臀99久久精品久久久久久软件| 欧美激情一区二区三区四区| 欧洲另类一二三四区| 日本中文字幕一区二区视频| 亚洲国产电影在线观看| 欧美精品乱码久久久久久按摩 | 中文字幕久久午夜不卡| 一本大道久久a久久综合婷婷 | 69堂亚洲精品首页| 粉嫩蜜臀av国产精品网站| 日本在线不卡视频一二三区| 亚洲青青青在线视频| 久久一夜天堂av一区二区三区| 在线区一区二视频| 久99久精品视频免费观看| 一区二区三区美女视频| 欧美α欧美αv大片| 精品视频1区2区3区| 一本到高清视频免费精品| 成人手机电影网| 国产福利一区在线| 麻豆91在线观看| 久久不见久久见中文字幕免费| 亚洲一级电影视频| 亚洲免费观看在线视频| 亚洲欧美在线视频观看| 国产日本欧美一区二区| 2019国产精品| 久久综合成人精品亚洲另类欧美| 色综合久久久久网| 91无套直看片红桃| 99麻豆久久久国产精品免费优播| 国产成人av在线影院| 国产一区二区网址| 国产精品一卡二卡在线观看| 国产在线精品一区二区三区不卡| 亚洲一二三四在线观看| 日本午夜精品一区二区三区电影| 亚洲韩国精品一区| 亚洲国产中文字幕| 日韩中文字幕一区二区三区| 午夜成人免费视频| 奇米四色…亚洲| 美女精品一区二区| 99久精品国产| 色婷婷av一区二区三区之一色屋| 91欧美激情一区二区三区成人| 不卡一区二区中文字幕| 99国产精品国产精品毛片| 91免费看视频| 成人黄色av网站在线| 欧美亚洲综合网| 日韩一级大片在线| 久久久久亚洲蜜桃| 自拍偷拍亚洲激情| 亚洲va天堂va国产va久| 一区二区在线观看视频| 极品美女销魂一区二区三区免费| 国精产品一区一区三区mba视频| 老司机免费视频一区二区三区| 国产精品香蕉一区二区三区| 91视频在线观看免费| 日韩一级成人av| xf在线a精品一区二区视频网站| 亚洲欧美偷拍卡通变态| 免费观看30秒视频久久| 国产米奇在线777精品观看|