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

📄 a00014.html

📁 这是一个用于创建多线程的程序
💻 HTML
📖 第 1 页 / 共 3 页
字号:
        <tr>          <td class="md" nowrap valign="top">#define PT_WAIT_THREAD          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="a00005.html">pt</a>,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>thread&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Block and wait until a child protothread completes. <p>This macro schedules a child protothread. The current protothread will block until the child protothread completes.<p><dl compact><dt><b>Note:</b></dt><dd>The child protothread must be manually initialized with the <a class="el" href="a00014.html#ge6bae7dc0225468c8a5ac269df549892">PT_INIT()</a> function before this function is used.</dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pt</em>&nbsp;</td><td>A pointer to the protothread control structure. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>thread</em>&nbsp;</td><td>The child protothread with arguments</td></tr>  </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="a00014.html#g9e97a0b4d5cc7764d8e19758f5da53ae">PT_SPAWN()</a> </dd></dl><p>Definition at line <a class="el" href="a00022.html#l00192">192</a> of file <a class="el" href="a00022.html">pt.h</a>.    </td>  </tr></table><a class="anchor" name="g99e43010ec61327164466aa2d902de45"></a><!-- doxytag: member="pt.h::PT_WAIT_UNTIL" ref="g99e43010ec61327164466aa2d902de45" args="(pt, condition)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define PT_WAIT_UNTIL          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="a00005.html">pt</a>,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>condition&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Block and wait until condition is true. <p>This macro blocks the protothread until the specified condition is true.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pt</em>&nbsp;</td><td>A pointer to the protothread control structure. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>condition</em>&nbsp;</td><td>The condition. </td></tr>  </table></dl><p>Definition at line <a class="el" href="a00022.html#l00148">148</a> of file <a class="el" href="a00022.html">pt.h</a>.    </td>  </tr></table><a class="anchor" name="gad14bbbf092b90aa0a5a4f9169504a8d"></a><!-- doxytag: member="pt.h::PT_WAIT_WHILE" ref="gad14bbbf092b90aa0a5a4f9169504a8d" args="(pt, cond)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define PT_WAIT_WHILE          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="a00005.html">pt</a>,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>cond&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Block and wait while condition is true. <p>This function blocks and waits while condition is true. See <a class="el" href="a00014.html#g99e43010ec61327164466aa2d902de45">PT_WAIT_UNTIL()</a>.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pt</em>&nbsp;</td><td>A pointer to the protothread control structure. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>The condition. </td></tr>  </table></dl><p>Definition at line <a class="el" href="a00022.html#l00167">167</a> of file <a class="el" href="a00022.html">pt.h</a>.    </td>  </tr></table><a class="anchor" name="g155cba6121323726d02c00284428fed6"></a><!-- doxytag: member="pt.h::PT_YIELD" ref="g155cba6121323726d02c00284428fed6" args="(pt)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define PT_YIELD          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="a00005.html">pt</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Yield from the current protothread. <p>This function will yield the protothread, thereby allowing other processing to take place in the system.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pt</em>&nbsp;</td><td>A pointer to the protothread control structure. </td></tr>  </table></dl><p>Definition at line <a class="el" href="a00022.html#l00290">290</a> of file <a class="el" href="a00022.html">pt.h</a>.    </td>  </tr></table><a class="anchor" name="ge3c821e3a388615528efda9d23c7d115"></a><!-- doxytag: member="pt.h::PT_YIELD_UNTIL" ref="ge3c821e3a388615528efda9d23c7d115" args="(pt, cond)" --><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define PT_YIELD_UNTIL          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="a00005.html">pt</a>,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>cond&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Yield from the protothread until a condition occurs. <p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pt</em>&nbsp;</td><td>A pointer to the protothread control structure. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>cond</em>&nbsp;</td><td>The condition.</td></tr>  </table></dl>This function will yield the protothread, until the specified condition evaluates to true. <p>Definition at line <a class="el" href="a00022.html#l00310">310</a> of file <a class="el" href="a00022.html">pt.h</a>.    </td>  </tr></table><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 2 10:06:29 2006 for The Protothreads Library 1.4 by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address></body></html>

⌨️ 快捷键说明

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