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

📄 c-shell2.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="91953"> </a>Spawn a task to call a function repeatedly.</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="91957"> </a><b class="routine"><i class="routine">taskIdDefault</i></b><b>(&nbsp;)</b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="91961"> </a>Set or report the default (current) task ID (see <a href="c-shell3.html#92081"><i class="title">6.3.4&nbsp;The "Current" Task and Address</i></a> for a discussion of how the current task is established and used).</div></td><td width="10">&nbsp;</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="90590"> </a>The <b class="routine"><i class="routine">repeat</i></b><b>(&nbsp;)</b> and <b class="routine"><i class="routine">period</i></b><b>(&nbsp;)</b> commands spawn tasks whose entry points are <b class="symbol_lc">_repeatHost</b> and <b class="symbol_lc">_periodHost</b>. The shell downloads these support routines when you call <b class="routine"><i class="routine">repeat</i></b><b>(&nbsp;)</b> or <b class="routine"><i class="routine">period</i></b><b>(&nbsp;)</b>. (With remote target servers, that download sometimes fails; for a discussion of when this is possible, and what you can do about it, see <a href="c-shell6.html#100857"><i class="title">6.6&nbsp;Object Module Load Path</i></a>.) These tasks may be controlled like any other tasks on the target; for example, you can suspend or delete them with <b class="routine"><i class="routine">ts</i></b><b>(&nbsp;)</b> or <b class="routine"><i class="routine">td</i></b><b>(&nbsp;)</b> respectively.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="92029">Task Information</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="92028"> </a><a href="c-shell2.html#91977">Table&nbsp;6-3</a> summarizes the WindSh commands that report task information. <p class="table"><h4 class="EntityTitle"><a name="91977"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 6-3:&nbsp;&nbsp;WindSh Commands for Task Information</font></a></h4><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="91981"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Call</font></b></div></th><td width="10">&nbsp;</td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="91983"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Description</font></b></div></th><td width="10">&nbsp;</td></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="91987"> </a><b class="routine"><i class="routine">i</i></b><b>(&nbsp;)</b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="91989"> </a>Display system information. This command gives a snapshot of what tasks are in the system, and some information about each of them, such as state, PC, SP, and TCB address. To save memory, this command queries the target repeatedly; thus, it may occasionally give an inconsistent snapshot.</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="91993"> </a><b class="routine"><i class="routine">iStrict</i></b><b>(&nbsp;)</b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="91995"> </a>Display the same information as <b class="routine"><i class="routine">i</i></b><b>(&nbsp;)</b>, but query target system information only once. At the expense of consuming more intermediate memory, this guarantees an accurate snapshot.</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="91999"> </a><b class="routine"><i class="routine">ti</i></b><b>(&nbsp;)</b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="92001"> </a>Display task information. This command gives all the information contained in a task's TCB. This includes everything shown for that task by an <b class="routine"><i class="routine">i</i></b><b>(</b>&nbsp;<b>)</b> command, plus all the task's registers, and the links in the TCB chain. If <i class="textVariable">task</i> is 0 (or the argument is omitted), the current task is reported on.</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="92125"> </a><b class="routine"><i class="routine">w</i></b><b>(&nbsp;)</b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="92127"> </a>Print a summary of each task's pending information, task by task. This routine calls <b class="routine"><i class="routine">taskWaitShow</i></b><b>(&nbsp;)</b> in quiet mode on all tasks in the system, or a specified task if the argument is given. </div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="92121"> </a><b class="routine"><i class="routine">tw</i></b><b>(&nbsp;)</b> </div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="92123"> </a>Print information about the object the given task is pending on. This routine calls <b class="routine"><i class="routine">taskWaitShow</i></b><b>(&nbsp;)</b> on the given task in verbose mode.</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="92005"> </a><b class="routine"><i class="routine">checkStack</i></b><b>(&nbsp;)</b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="92007"> </a>Show a stack usage summary for a task, or for all tasks if no task is specified. The summary includes the total stack size (SIZE), the current number of stack bytes (CUR), the maximum number of stack bytes used (HIGH), and the number of bytes never used at the top of the stack (MARGIN = SIZE - HIGH). Use this routine to determine how much stack space to allocate, and to detect stack overflow. This routine does not work for tasks that use the <b class="symbol_UC">VX_NO_STACK_FILL</b> option.</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="92012"> </a><b class="routine"><i class="routine">tt</i></b><b>(&nbsp;)</b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="92014"> </a>Display a stack trace.</div></td><td width="10">&nbsp;</td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="92018"> </a><b class="routine"><i class="routine">taskIdFigure</i></b><b>(&nbsp;)</b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="92020"> </a>Report a task ID, given its name.</div></td><td width="10">&nbsp;</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="90599"> </a>The <b class="routine"><i class="routine">i</i></b><b>(&nbsp;)</b> command is commonly used to get a quick report on target activity. (To see this information periodically, use the Tornado browser; see <a href="c-browser.html#86165"><i class="title">7.&nbsp;Browser</i></a>). If nothing seems to be happening, <b class="routine"><i class="routine">i</i></b><b>(&nbsp;)</b> is often a good place to start investigating. To display summary information about all running tasks:</p></dl><dl class="margin"><dd><pre class="Code"><b><a name="91799"></b><tt class="output">-&gt;&nbsp;</tt><b>i </b><tt class="output">&nbsp;&nbsp;NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ENTRY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TID&nbsp;&nbsp;&nbsp;&nbsp;PRI&nbsp;&nbsp;&nbsp;STATUS&nbsp;&nbsp;&nbsp;&nbsp;PC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ERRNO&nbsp;&nbsp;DELAY ---------&nbsp;-----------&nbsp;--------&nbsp;---&nbsp;--------&nbsp;-------&nbsp;--------&nbsp;-------&nbsp;----- tExcTask&nbsp;&nbsp;_excTask&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3ad290&nbsp;&nbsp;&nbsp;0&nbsp;PEND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4df10&nbsp;&nbsp;&nbsp;3ad0c0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 tLogTask&nbsp;&nbsp;_logTask&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3aa918&nbsp;&nbsp;&nbsp;0&nbsp;PEND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4df10&nbsp;&nbsp;&nbsp;3aa748&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 tWdbTask&nbsp;&nbsp;0x41288&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3870f0&nbsp;&nbsp;&nbsp;3&nbsp;READY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23ff4&nbsp;&nbsp;&nbsp;386d78&nbsp;&nbsp;3d0004&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 tNetTask&nbsp;&nbsp;_netTask&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3a59c0&nbsp;&nbsp;50&nbsp;READY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;24200&nbsp;&nbsp;&nbsp;3a5730&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 tFtpdTask&nbsp;_ftpdTask&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3a2c18&nbsp;&nbsp;55&nbsp;PEND&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;23b28&nbsp;&nbsp;&nbsp;3a2938&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 value&nbsp;=&nbsp;0&nbsp;=&nbsp;0x0</tt><b></a></b></pre></dl><dl class="margin"><dd><p class="Body"><a name="94738"> </a>The <b class="routine"><i class="routine">w</i></b><b>(&nbsp;)</b> and <b class="routine"><i class="routine">tw</i></b><b>(&nbsp;)</b> commands allow you to see what object a VxWorks task is pending on. <b class="routine"><i class="routine">w</i></b><b>(&nbsp;)</b> displays summary information for all tasks, while <b class="routine"><i class="routine">tw</i></b><b>(&nbsp;)</b> displays object information for a specific task. Note that <tt class="output">OBJ_NAME</tt> field is used only for objects that have a symbolic name associated with the address of their structure.</p></dl><dl class="margin"><dd><pre class="Code"><b><a name="97740"></b><tt class="output">-&gt;</tt><b> w </b><tt class="output"> NAME &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ENTRY &nbsp;&nbsp;&nbsp;&nbsp;TID &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;STATUS &nbsp;&nbsp;&nbsp;DELAY OBJ_TYPE &nbsp;&nbsp;OBJ_ID &nbsp;&nbsp;OBJ_NAME ---------- ---------- -------- --------- ----- ---------- -------- ---------- tExcTask &nbsp;&nbsp;_excTask &nbsp;&nbsp;3d9e3c &nbsp;&nbsp;PEND &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 MSG_Q(R) &nbsp;&nbsp;3d9ff4 &nbsp;&nbsp;N/A tLogTask &nbsp;&nbsp;_logTask &nbsp;&nbsp;3d7510 &nbsp;&nbsp;PEND &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 MSG_Q(R) &nbsp;&nbsp;3d76c8 &nbsp;&nbsp;N/A tWdbTask &nbsp;&nbsp;_wdbCmdLoo 36dde4 &nbsp;&nbsp;READY &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 tNetTask &nbsp;&nbsp;_netTask &nbsp;&nbsp;3a43d0 &nbsp;&nbsp;READY &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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tt><b> tw u1 </b><tt class="output"> NAME &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ENTRY &nbsp;&nbsp;&nbsp;&nbsp;TID &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;STATUS &nbsp;&nbsp;&nbsp;DELAY OBJ_TYPE &nbsp;&nbsp;OBJ_ID &nbsp;&nbsp;OBJ_NAME ---------- ---------- -------- --------- ----- ---------- -------- ---------- u1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_smtask3 &nbsp;&nbsp;367c54 &nbsp;&nbsp;PEND &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 MSG_Q_S(S) 370b61 &nbsp;&nbsp;N/A  Message Queue Id &nbsp;&nbsp;: 0x370b61 Task Queueing &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: SHARED_FIFO Message Byte Len &nbsp;&nbsp;: 100 Messages Max &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: 0 Messages Queued &nbsp;&nbsp;&nbsp;: 0 Senders Blocked &nbsp;&nbsp;&nbsp;: 2 Send Timeouts &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: 0 Receive Timeouts &nbsp;&nbsp;: 0  Senders Blocked: TID &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CPU Number Shared TCB ---------- ---------- ---------- 0x36cc2c &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x36e464 0x367c54 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x36e47c  value = 0 = 0x0 -&gt;</tt><b></a></b></pre></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="97789">System Information</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="90611"> </a><a href="c-shell2.html#90615">Table&nbsp;6-4</a> shows the WindSh commands that display information from the symbol table, from the target system, and from the shell itself.<p class="table"><h4 class="EntityTitle"><a name="90615"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 6-4:&nbsp;&nbsp;WindSh Commands for System Information</font></a></h4><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="90619"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Call</font></b></div></th><td width="10">&nbsp;</td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="90621"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Description</font></b></div></th><td width="10">&nbsp;</td></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="90625"> </a><b class="routine"><i class="routine">devs</i></b><b>(&nbsp;)</b></div></td><td width="10">&nbsp;</td><td colspan=1 rowspan=1><div class="CellBody"><a name="90627"> </a>List all devices known on the target system.</div></td><td width="10">&nbsp;</td></tr><tr valign="top">

⌨️ 快捷键说明

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