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

📄 usrlib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 5 页
字号:
A task ID, or ERROR if the task cannot be spawned.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><i><a href="./usrLib.html#periodRun">periodRun</a></i>(&nbsp;)</b>, <b><i><a href="./usrLib.html#sp">sp</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell, </i>windsh,  <i>Tornado User's Guide: Shell</i><hr><a name="repeatRun"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>repeatRun</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>repeatRun</i>(&nbsp;)</strong> - call a function repeatedly</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void repeatRun    (    int     n,    /* no. of times to call func (0=forever) */    FUNCPTR func, /* function to call repeatedly */    int     arg1, /* first of eight args to pass to func */    int     arg2,    int     arg3,    int     arg4,    int     arg5,    int     arg6,    int     arg7,    int     arg8    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command calls a specified function <i>n</i> times, with up to eight of itsarguments.  If <i>n</i> is 0, the routine is called endlessly.<p>Normally, this routine is called only by <b><i><a href="./usrLib.html#repeat">repeat</a></i>(&nbsp;)</b>, which spawns it as atask.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><i><a href="./usrLib.html#repeat">repeat</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell</i><hr><a name="repeat"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>repeat</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>repeat</i>(&nbsp;)</strong> - spawn a task to call a function repeatedly</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int repeat    (    int     n,    /* no. of times to call func (0=forever) */    FUNCPTR func, /* function to call repeatedly */    int     arg1, /* first of eight args to pass to func */    int     arg2,    int     arg3,    int     arg4,    int     arg5,    int     arg6,    int     arg7,    int     arg8    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command spawns a task that calls a specified function <i>n</i> times, withup to eight of its arguments.  If <i>n</i> is 0, the routine is calledendlessly, or until the spawned task is deleted.<p></blockquote><h4>NOTE</h4><blockquote><p>The task is spawned using <b><i><a href="./usrLib.html#sp">sp</a></i>(&nbsp;)</b>.  See the description of <b><i><a href="./usrLib.html#sp">sp</a></i>(&nbsp;)</b> for detailsabout priority, options, stack size, and task ID.<p></blockquote><h4>RETURNS</h4><blockquote><p>A task ID, or ERROR if the task cannot be spawned.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><i><a href="./usrLib.html#repeatRun">repeatRun</a></i>(&nbsp;)</b>, <b><i><a href="./usrLib.html#sp">sp</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell, </i>windsh,  <i>Tornado User's Guide: Shell</i><hr><a name="sp"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>sp</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>sp</i>(&nbsp;)</strong> - spawn a task with default parameters</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sp    (    FUNCPTR func, /* function to call */    int     arg1, /* first of nine args to pass to spawned task */    int     arg2,    int     arg3,    int     arg4,    int     arg5,    int     arg6,    int     arg7,    int     arg8,    int     arg9    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command spawns a specified function as a task with the followingdefaults:<dl><dt>priority:<dd></blockquote><h4>100</h4><blockquote><p><p><dt>stack size:<dd>20,000 bytes<p><dt>task ID:<dd>highest not currently used<p><dt>task options:<dd><b>VX_FP_TASK</b> - execute with floating-point coprocessor support.<p><dt>task name:<dd> A name of the form <b>tN</b> where N is an integer which increments as new tasksare spawned, e.g., <b>t1</b>, <b>t2</b>, <b>t3</b>, etc. </dl><p>The task ID is displayed after the task is spawned.<p>This command is a short form of the underlying <b><i><a href="./taskLib.html#taskSpawn">taskSpawn</a></i>(&nbsp;)</b> routine,convenient for spawning tasks in which the default parametersare satisfactory.  If the default parameters are unacceptable, <b><i><a href="./taskLib.html#taskSpawn">taskSpawn</a></i>(&nbsp;)</b>should be called directly.<p></blockquote><h4>RETURNS</h4><blockquote><p>A task ID, or ERROR if the task cannot be spawned.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><a href="./taskLib.html#top">taskLib</a></b>, <b><i><a href="./taskLib.html#taskSpawn">taskSpawn</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell, </i>windsh,  <i>Tornado User's Guide: Shell</i><p>VARARGS1<hr><a name="checkStack"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>checkStack</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>checkStack</i>(&nbsp;)</strong> - print a summary of each task's stack usage</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void checkStack    (    int taskNameOrId /* task name or task ID; 0 = summarize all */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command displays a summary of stack usage for a specified task, orfor all tasks if no argument is given.  The summary includes the totalstack size (SIZE), the current number of stack bytes used (CUR), themaximum number of stack bytes used (HIGH), and the number of bytes neverused at the top of the stack (MARGIN = SIZE - HIGH).For example:<pre>    -&gt; checkStack tShell        NAME         ENTRY      TID    SIZE   CUR  HIGH  MARGIN    ------------ ------------ -------- ----- ----- ----- ------    tShell       _shell       23e1c78   9208   832  3632   5576</pre>The maximum stack usage is determined by scanning down from the top of thestack for the first byte whose value is not 0xee.  In VxWorks, when a taskis spawned, all bytes of a task's stack are initialized to 0xee.<p></blockquote><h4>DEFICIENCIES</h4><blockquote><p>It is possible for a task to write beyond the end of its stack, butnot write into the last part of its stack.  This will not be detectedby <b><i><a href="./usrLib.html#checkStack">checkStack</a></i>(&nbsp;)</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><i><a href="./taskLib.html#taskSpawn">taskSpawn</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell, </i>windsh,  <i>Tornado User's Guide: Shell</i><hr><a name="i"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>i</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>i</i>(&nbsp;)</strong> - print a summary of each task's TCB</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void i    (    int taskNameOrId /* task name or task ID, 0 = summarize all */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command displays a synopsis of all the tasks in the system.The <b><i><a href="./usrLib.html#ti">ti</a></i>(&nbsp;)</b> routine provides more complete information on a specific task.<p>Both <b><i><a href="./usrLib.html#i">i</a></i>(&nbsp;)</b> and <b><i><a href="./usrLib.html#ti">ti</a></i>(&nbsp;)</b> use <b><i><a href="./taskShow.html#taskShow">taskShow</a></i>(&nbsp;)</b>; see the documentation for <b><i><a href="./taskShow.html#taskShow">taskShow</a></i>(&nbsp;)</b> for a description of the output format.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><p><pre>-&gt; i   NAME       ENTRY     TID    PRI   STATUS    PC       SP    ERRNO DELAY---------- ---------- -------- --- --------- ------- -------- ----- -----tExcTask   _excTask    20fcb00   0 PEND      200c5fc  20fca6c     0     0tLogTask   _logTask    20fb5b8   0 PEND      200c5fc  20fb520     0     0tShell     _shell      20efcac   1 READY     201dc90  20ef980     0     0tRlogind   _rlogind    20f3f90   2 PEND      2038614  20f3db0     0     0tTelnetd   _telnetd    20f2124   2 PEND      2038614  20f2070     0     0tNetTask   _netTask    20f7398  50 PEND      2038614  20f7340     0     0value = 57 = 0x39 = '9'</pre></blockquote><h4>CAVEAT</h4><blockquote><p>This command should be used only as a debugging aid, since the informationis obsolete by the time it is displayed.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><i><a href="./usrLib.html#ti">ti</a></i>(&nbsp;)</b>, <b><i><a href="./taskShow.html#taskShow">taskShow</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell, </i>windsh,  <i>Tornado User's Guide: Shell</i><hr><a name="ti"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ti</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ti</i>(&nbsp;)</strong> - print complete information from a task's TCB</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void ti    (    int taskNameOrId /* task name or task ID; 0 = use default */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command prints the task control block (TCB) contents, includingregisters, for a specified task.  If <i>taskNameOrId</i> is omitted or zero,the last task referenced is assumed.<p>The <b><i><a href="./usrLib.html#ti">ti</a></i>(&nbsp;)</b> routine uses <b><i><a href="./taskShow.html#taskShow">taskShow</a></i>(&nbsp;)</b>; see the documentation for <b><i><a href="./taskShow.html#taskShow">taskShow</a></i>(&nbsp;)</b> for a description of the output format.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><p>The following shows the TCB contents for the shell task:<pre>-&gt; ti  NAME      ENTRY     TID    PRI  STATUS      PC       SP    ERRNO  DELAY---------- --------- -------- --- --------- -------- -------- ------ -----tShell     _shell     20efcac   1 READY      201dc90  20ef980      0     0stack: base 0x20efcac  end 0x20ed59c  size 9532   high 1452   margin 8080options: 0x1eVX_UNBREAKABLE      VX_DEALLOC_STACK    VX_FP_TASK         VX_STDIOD0 =       0   D4 =       0   A0 =       0   A4 =        0D1 =       0   D5 =       0   A1 =       0   A5 =  203a084   SR =     3000D2 =       0   D6 =       0   A2 =       0   A6 =  20ef9a0   PC =  2038614D3 =       0   D7 =       0   A3 =       0   A7 =  20ef980value = 34536868 = 0x20efda4</pre></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./usrLib.html#top">usrLib</a></b>, <b><i><a href="./taskShow.html#taskShow">taskShow</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Target Shell, </i>windsh,  <i>Tornado User's Guide: Shell</i><hr><a name="show"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>show</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>show</i>(&nbsp;)</strong> - print information on a specified object</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void show    (    int objId, /* object ID */    int level  /* information level */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This command prints information on the specified object.  System objectsinclude tasks, local and shared semaphores, local and shared message

⌨️ 快捷键说明

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