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

📄 os20rto6.htm

📁 ST20 Embedded Toolset R2.0.5用于开发基于ST20芯片机顶盒软件的开发平台,2.0.5版本,国内找不到的.在国外论坛上花了N天才找到!
💻 HTM
字号:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="Quadralay WebWorks Publisher Professional Edition 6.0.5">
<meta name="TEMPLATEBASE" content="book_html">
<meta name="LASTUPDATED" content="12/04/03 16:06:08">
<title>11.2.3 Task states  </title>

<STYLE TYPE="text/css">
<!--
	span.Signal { text-transform: uppercase; font-family: Verdana }
-->
</STYLE>

</head>

<body link="#3366CC" vlink="#9999CC" text="#000000" alink="#0000CC" bgcolor="#FFFFFF"
background="images/backgrnd.gif">

<p><img src="images/stlogo.gif" width="106" height="83" align="left"
alt="logo here!"> </p>

<table width="331" border="0" align="right" cellpadding="0" cellspacing="0">
  <tr>
    <td><a href="a_refman.htm"><img src="images/navtoc.gif" width="84" height="23"
    border="0" alt="TOC"> </a></td>
    <td><a href="os20rto5.htm"><img src="images/navprev.gif" width="80" height="23"
    border="0" alt="PREV"> </a></td>
    <td><a href="os20rto7.htm"><img src="images/navnext.gif" width="83" height="23"
    border="0" alt="NEXT"> </a></td>
    <td><a href="a_refmaa.htm"><img src="images/navidx.gif" width="84" height="23"
    border="0" alt="INDEX"> </a></td>
  </tr>
</table>

<p><br clear="all">
</p>

<hr align="left">

<blockquote>
<h3>
  <a name="1204475"> </a><font color="#003366"  face="Verdana, Arial, Helvetica, sans-serif">11.2.3 	 Task states</font>
</h3>


<p>
  <a name="1204476"> </a><font size=2  face="Verdana, Arial, Helvetica, sans-serif">When <strong>st20run</strong> prints a task's state, it is in one of two forms:</font>
</p>


<a name="1204477"> </a><font size=2 face=Courier><strong>task 0 "job(0)" stopped at &lt;main.c 33 1&gt; by breakpoint 0<br></strong></font>



<p>
  <a name="1204478"> </a><font size=2  face="Verdana, Arial, Helvetica, sans-serif">or:</font>
</p>


<a name="1204479"> </a><font size=2 face=Courier><strong>task 3 "root" active and scheduled last stopped at &lt;hello.c 53 0&gt; in space 0<br></strong></font>



<p>
  <a name="1204480"> </a><font size=2  face="Verdana, Arial, Helvetica, sans-serif">This line is made up from several components:</font>
</p>


<p>
  <a name="1204481"> </a><font size=2  face="Verdana, Arial, Helvetica, sans-serif">"<font size=2 face=Courier><strong>task</strong></font> <font size=2 face=Courier><strong><em>n</em></strong></font>" gives the task's ID. This is the ID which <strong>st20run</strong> uses, and has no connection with task identifiers on the target. This is the value which should be specified in <strong>st20run</strong> commands which take a <font size=2 face=Courier><strong><em>taskid</em></strong></font> parameter, for example <font size=2 face=Courier><strong>break</strong></font>.</font>
</p>


<p>
  <a name="1204482"> </a><font size=2  face="Verdana, Arial, Helvetica, sans-serif">The name in quotes is the name of the task, specified when it was created.</font>
</p>


<p>
  <a name="1204483"> </a><font size=2  face="Verdana, Arial, Helvetica, sans-serif">In the first, "<font size=2 face=Courier><strong>stopped at</strong></font>" form, this shows that this was the task which was executing when the target was stopped. It is followed by the source reference for the statement the task was executing when it was stopped. If <strong>st20run</strong> is unable to determine the source reference (which occurs when there is no detailed debug information for that location) then the value of the <span class=Signal>Iptr</span> is displayed. Finally the reason why the task was stopped is shown (breakpoint, stepout or step).</font>
</p>


<p>
  <a name="1204484"> </a><font size=2  face="Verdana, Arial, Helvetica, sans-serif">The second "<font size=2 face=Courier><strong>last stopped at</strong></font>" form is more complex, and means that this task was not the one which was executing when the target was stopped.</font>
</p>


<p>
  <a name="1204488"> </a><font size=2  face="Verdana, Arial, Helvetica, sans-serif">"<font size=2 face=Courier><strong>active</strong></font>" is the current OS20 task state, and can be one of:</font>
</p>

<ul>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204489"> </a><font size=2 face=Courier><strong>created</strong></font>: the task has been created, but has not started to run yet,</font></p>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204490"> </a><font size=2 face=Courier><strong>active</strong></font>: the task has started running,</font></p>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204491"> </a><font size=2 face=Courier><strong>terminating</strong></font>: the task has returned from its entry point (or been killed) but is still executing its onexit handler,</font></p>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204492"> </a><font size=2 face=Courier><strong>terminated</strong></font>: the task has finished running, and could be deleted using <font size=2 face=Courier><strong>task_delete()</strong></font>.</font></p>
</ul>

<p>
  <a name="1204493"> </a><font size=2  face="Verdana, Arial, Helvetica, sans-serif">"<font size=2 face=Courier><strong>scheduled</strong></font>" indicates what, if anything, is stopping the task from running. For a task this can be:</font>
</p>

<ul>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204494"> </a><font size=2 face=Courier><strong>channel</strong></font> <font size=2 face=Courier><strong>waiting</strong></font>: the task is blocked waiting for a channel (ST20C2 only),</font></p>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204495"> </a><font size=2 face=Courier><strong>semaphore</strong></font> <font size=2 face=Courier><strong>waiting</strong></font>: the task is blocked waiting for a semaphore or message queue,</font></p>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204496"> </a><font size=2 face=Courier><strong>task</strong></font> <font size=2 face=Courier><strong>waiting</strong></font>: the task is blocked in a <font size=2 face=Courier><strong>task_wait()</strong></font>,</font></p>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204497"> </a><font size=2 face=Courier><strong>timer</strong></font> <font size=2 face=Courier><strong>waiting</strong></font>: the task is blocked waiting for a time (for example, <font size=2 face=Courier><strong>task_delay()</strong></font>),</font></p>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204498"> </a><font size=2 face=Courier><strong>interrupted</strong></font>: the task was running when interrupted by an interrupt handler,</font></p>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204499"> </a><font size=2 face=Courier><strong>preempted</strong></font>: the task was running when preempted by a higher priority task,</font></p>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204500"> </a><font size=2 face=Courier><strong>scheduled</strong></font>: the task is waiting to run (normally caused by the task being timesliced or the task waiting to run having been recently unblocked).</font></p>
</ul>

<p>
  <a name="1204501"> </a><font size=2 face="Verdana, Arial, Helvetica, sans-serif"><em>Note:	 Some of the waiting conditions can be combined, for example a task blocked on a timeout semaphore is displayed as both semaphore and timer waiting.</em></font>
</p>

<p>
  <a name="1204502"> </a><font size=2  face="Verdana, Arial, Helvetica, sans-serif">For a trap or interrupt handler the state can be one of:</font>
</p>

<ul>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204503"> </a><font size=2 face=Courier><strong>inactive</strong></font>: not currently running,</font></p>
<p>  <font size=2  face="Verdana, Arial, Helvetica, sans-serif"><li ><a name="1204504"> </a><font size=2 face=Courier><strong>interrupted</strong></font>: the task or interrupt was running when interrupted by a trap or higher priority interrupt handler.</font></p>
</ul>

<p>
  <a name="1204505"> </a><font size=2  face="Verdana, Arial, Helvetica, sans-serif">Finally the source reference shows the last statement which the task executed before being stopped, and which address space it is in.</font>
</p>
</blockquote>

<hr>



<table width="331" border="0" align="left" cellpadding="0" cellspacing="0">
  <tr>
    <td><a href="a_refman.htm"><img src="images/navtoc.gif" width="84" height="23"
    border="0" alt="TOC"> </a></td>
    <td><a href="os20rto5.htm"><img src="images/navprev.gif" width="80" height="23"
    border="0" alt="PREV"> </a></td>
    <td><a href="os20rto7.htm"><img src="images/navnext.gif" width="83" height="23"
    border="0" alt="NEXT"> </a></td>
    <td><a href="a_refmaa.htm"><img src="images/navidx.gif" width="84" height="23"
    border="0" alt="INDEX"> </a></td>
  </tr>
</table>
<font size=1 face="Verdana, Arial, Helvetica, sans-serif">&nbsp; &copy; 2001, 2002, 2003 STMicroelectronics. All Rights Reserved.<br>
&nbsp; ADCS 7250966F</font>
</body>
</html>

⌨️ 快捷键说明

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