⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 118.htm

📁 pcb设计资料初学者难得的入门资料包含工厂制作过程
💻 HTM
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CTerm非常精华下载</title>
</head>
<body bgcolor="#FFFFFF">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="577">
<tr><td width="32%" rowspan="3" height="123"><img src="DDl_back.jpg" width="300" height="129" alt="DDl_back.jpg"></td><td width="30%" background="DDl_back2.jpg" height="35"><p align="center"><a href="http://202.112.58.200"><font face="黑体"><big><big>Tsinghua</big></big></font></a></td></tr>
<tr>
<td width="68%" background="DDl_back2.jpg" height="44"><big><big><font face="黑体"><p align="center">         嵌入式系统                            (BM: turbolinux jacobw)          </font></big></big></td></tr>
<tr>
<td width="68%" height="44" bgcolor="#000000"><font face="黑体"><big><big><p   align="center"></big></big><a href="http://cterm.163.net"><img src="banner.gif" width="400" height="60" alt="banner.gif"border="0"></a></font></td>
</tr>
<tr><td width="100%" colspan="2" height="100" align="center" valign="top"><br><p align="center">[<a href="嵌入式系统.htm">回到开始</a>][<a href="60.htm">上一层</a>][<a href="119.htm">下一篇</a>]
<hr><p align="left"><small> 在ev_send()中,说This system call sends events to a task.If the target <br>

task is not waiting for events,the newly sent events are simply made pending. <br>

这里pending 是什么意思??ev_send()调用会不会等待??还是立即返回?? <br>

  <br>

发信人: nonsun (无晴), 信区: Embedded <br>

标  题: Re: 请问pending???????????? <br>

发信站: BBS 水木清华站 (Wed Nov  1 23:59:16 2000) <br>

  <br>

这个pending是指event的pending,而不是任务的。 <br>

在ev_send()函数里实际上是没有有关阻塞的参数的 <br>

(如超时时间,要注意在实时领域里,绝对不能有 <br>

什么系统调用所耗时间是不可预知的,所以如果一个 <br>

系统调用是可能阻塞的话,它一定是可以指定超时 <br>

设置的)。 <br>

  <br>

另外,在ev_receive()函数的解释中其实讲得很清楚 <br>

这个“pending”是什么意思,看看《pSOSystem <br>

Reference Manual》中的《pSOSystem System Calls》 <br>

吧: <br>

  <br>

ev_receive <br>

        Enables a task to wait for an event condition. <br>

  <br>

  <br>

Notes <br>

  1. Events are not accumulated. No matter how many <br>

identical events are sent to the calling task before <br>

it calls ev_receive() for receiving the event, the <br>

result is the same as if one event were pending. <br>

  <br>

  2. The ev_receive() call captures only the events <br>

that the caller selects. It captures each selected <br>

event once. If a pending event does not match a <br>

selected event, the pending event remains pending. <br>

Also, if a pending event was sent after an earlier <br>

event was used to match a selected event, the pending <br>

event remains pending. Consider the following example <br>

sequence: <br>

  <br>

    a. Task P has pending events 1 and 2. <br>

    b. With EV_ALL set, P calls ev_receive() for <br>

       events 1, 3, and 8. Pending event 1 is cleared. <br>

    c. Task A sends events 1 and 8 to P. <br>

    d. Event 1 is made pending. Event 8 is used to <br>

       match the wanted event. <br>

    e. Task B sends events 2, 3, and 5 to P. Event 2 <br>



       has no effect because event 2 is already pending. <br>

       Event 5 is unwanted and made pending. Event 3 is <br>

       used to match a wanted event. The event condition <br>

       is met, so P becomes ready to run. <br>

    f. Events 1, 2, and 5 are left pending. <br>

    g. Events 1, 3, and 8 are returned in events_r. <br>

  <br>

  <br>

【 在 doot (ltt) 的大作中提到: 】 <br>

: 不会 <br>

  <br>

  <br>

-- <br>

  <br>

      我歌月徘徊,我舞影零乱 <br>

  <br>

      醒时同交欢,醉后各分散 <br>

  <br>

  <br>

※ 来源:·BBS 水木清华站 smth.org·[FROM: 202.204.7.235] <br>

</small><hr>
<p align="center">[<a href="嵌入式系统.htm">回到开始</a>][<a href="60.htm">上一层</a>][<a href="119.htm">下一篇</a>]
<p align="center"><a href="http://cterm.163.net">欢迎访问Cterm主页</a></p>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -