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

📄 tasklib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./taskLib.html#top">taskLib</a></b>, <b><i><a href="./taskLib.html#taskActivate">taskActivate</a></i>(&nbsp;)</b>, <b><i><a href="./taskLib.html#taskSpawn">taskSpawn</a></i>(&nbsp;)</b><p>VARARGS7<hr><a name="taskActivate"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>taskActivate</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>taskActivate</i>(&nbsp;)</strong> - activate a task that has been initialized</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS taskActivate    (    int tid /* task ID of task to activate */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine activates tasks created by <b><i><a href="./taskLib.html#taskInit">taskInit</a></i>(&nbsp;)</b>.  Without activation, atask is ineligible for CPU allocation by the scheduler.<p>The <i>tid</i> (task ID) argument is simply the address of the <b>WIND_TCB</b>for the task (the <b><i><a href="./taskLib.html#taskInit">taskInit</a></i>(&nbsp;)</b> <i>pTcb</i> argument), cast to an integer:<pre>tid = (int) pTcb;</pre>The <b><i><a href="./taskLib.html#taskSpawn">taskSpawn</a></i>(&nbsp;)</b> routine is built from <b><i><a href="./taskLib.html#taskActivate">taskActivate</a></i>(&nbsp;)</b> and <b><i><a href="./taskLib.html#taskInit">taskInit</a></i>(&nbsp;)</b>.Tasks created by <b><i><a href="./taskLib.html#taskSpawn">taskSpawn</a></i>(&nbsp;)</b> do not require explicit task activation.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the task cannot be activated.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./taskLib.html#top">taskLib</a></b>, <b><i><a href="./taskLib.html#taskInit">taskInit</a></i>(&nbsp;)</b><hr><a name="exit"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>exit</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>exit</i>(&nbsp;)</strong> - exit a task  (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void exit    (    int code /* code stored in TCB for delete hooks */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine is called by a task to cease to exist as a task.  It iscalled implicitly when the "main" routine of a spawned task is exited.The <i>code</i> parameter will be stored in the <b>WIND_TCB</b> forpossible use by the delete hooks, or post-mortem debugging.<p></blockquote><h4>ERRNO</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./taskLib.html#top">taskLib</a></b>, <b><i><a href="./taskLib.html#taskDelete">taskDelete</a></i>(&nbsp;)</b>,  <i>American National Standard for Information Systems - </i><i>Programming Language - C, ANSI X3.159-1989: Input/Output (<b>stdlib.h</b>), </i><i>VxWorks Programmer's Guide: Basic OS</i><hr><a name="taskDelete"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>taskDelete</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>taskDelete</i>(&nbsp;)</strong> - delete a task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS taskDelete    (    int tid /* task ID of task to delete */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine causes a specified task to cease to exist and deallocates thestack and <b>WIND_TCB</b> memory resources.  Upon deletion, all routines specifiedby <b><i><a href="./taskHookLib.html#taskDeleteHookAdd">taskDeleteHookAdd</a></i>(&nbsp;)</b> will be called in the context of the deleting task.This routine is the companion routine to <b><i><a href="./taskLib.html#taskSpawn">taskSpawn</a></i>(&nbsp;)</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the task cannot be deleted.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_intLib_NOT_ISR_CALLABLE, S_objLib_OBJ_DELETED<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S_objLib_OBJ_UNAVAILABLE,&nbsp;S_objLib_OBJ_ID_ERROR<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./taskLib.html#top">taskLib</a></b>, <b><a href="./excLib.html#top">excLib</a></b>, <b><i><a href="./taskHookLib.html#taskDeleteHookAdd">taskDeleteHookAdd</a></i>(&nbsp;)</b>, <b><i><a href="./taskLib.html#taskSpawn">taskSpawn</a></i>(&nbsp;)</b>,  <i>VxWorks Programmer's Guide: Basic OS</i><hr><a name="taskDeleteForce"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>taskDeleteForce</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>taskDeleteForce</i>(&nbsp;)</strong> - delete a task without restriction</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS taskDeleteForce    (    int tid /* task ID of task to delete */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine deletes a task even if the task is protected from deletion.  It is similar to <b><i><a href="./taskLib.html#taskDelete">taskDelete</a></i>(&nbsp;)</b>.  Upon deletion, all routinesspecified by <b><i><a href="./taskHookLib.html#taskDeleteHookAdd">taskDeleteHookAdd</a></i>(&nbsp;)</b> will be called in the context of thedeleting task.<p></blockquote><h4>CAVEATS</h4><blockquote><p>This routine is intended as a debugging aid, and is generally inappropriatefor applications.  Disregarding a task's deletion protection could leave thethe system in an unstable state or lead to system deadlock.<p>The system does not protect against simultaneous <b><i><a href="./taskLib.html#taskDeleteForce">taskDeleteForce</a></i>(&nbsp;)</b> calls.Such a situation could leave the system in an unstable state.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the task cannot be deleted.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_intLib_NOT_ISR_CALLABLE, S_objLib_OBJ_DELETED,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S_objLib_OBJ_UNAVAILABLE,&nbsp;S_objLib_OBJ_ID_ERROR<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./taskLib.html#top">taskLib</a></b>, <b><i><a href="./taskHookLib.html#taskDeleteHookAdd">taskDeleteHookAdd</a></i>(&nbsp;)</b>, <b><i><a href="./taskLib.html#taskDelete">taskDelete</a></i>(&nbsp;)</b><hr><a name="taskSuspend"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>taskSuspend</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>taskSuspend</i>(&nbsp;)</strong> - suspend a task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS taskSuspend    (    int tid /* task ID of task to suspend */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine suspends a specified task.  A task ID of zero results inthe suspension of the calling task.  Suspension is additive, thus taskscan be delayed and suspended, or pended and suspended.  Suspended, delayedtasks whose delays expire remain suspended.  Likewise, suspended,pended tasks that unblock remain suspended only.<p>Care should be taken with asynchronous use of this facility.  The specifiedtask is suspended regardless of its current state.  The task could, forinstance, have mutual exclusion to some system resource, such as the network * or system memory partition.  If suspended during such a time, the facilitiesengaged are unavailable, and the situation often ends in deadlock.<p>This routine is the basis of the debugging and exception handling packages.However, as a synchronization mechanism, this facility should be rejected in favor of the more general semaphore facility.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the task cannot be suspended.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_objLib_OBJ_ID_ERROR</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./taskLib.html#top">taskLib</a></b><hr><a name="taskResume"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>taskResume</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>taskResume</i>(&nbsp;)</strong> - resume a task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS taskResume    (    int tid /* task ID of task to resume */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine resumes a specified task.  Suspension is cleared, andthe task operates in the remaining state.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the task cannot be resumed.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_objLib_OBJ_ID_ERROR</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./taskLib.html#top">taskLib</a></b><hr><a name="taskRestart"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>taskRestart</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>taskRestart</i>(&nbsp;)</strong> - restart a task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS taskRestart    (    int tid /* task ID of task to restart */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine "restarts" a task.  The task is first terminated, and thenreinitialized with the same ID, priority, options, original entry point,stack size, and parameters it had when it was terminated.  Self-restartingof a calling task is performed by the exception task.  The shell utilizesthis routine to restart itself when aborted.<p></blockquote><h4>NOTE</h4><blockquote><p>If the task has modified any of its start-up parameters, the restartedtask will start with the changed values.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the task ID is invalidor the task could not be restarted.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_intLib_NOT_ISR_CALLABLE, S_objLib_OBJ_DELETED,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S_objLib_OBJ_UNAVAILABLE,&nbsp;S_objLib_OBJ_ID_ERROR,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S_smObjLib_NOT_INITIALIZED,&nbsp;S_memLib_NOT_ENOUGH_MEMORY,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S_memLib_BLOCK_ERROR</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./taskLib.html#top">taskLib</a></b><hr><a name="taskPrioritySet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>taskPrioritySet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>taskPrioritySet</i>(&nbsp;)</strong> - change the priority of a task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS taskPrioritySet    (    int tid,        /* task ID */    int newPriority /* new priority */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine changes a task's priority to a specified priority.Priorities range from 0, the highest priority, to 255, the lowest priority.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the task ID is invalid.<p></blockquote><h4>ERRNO</h4><blockquote><p>S_taskLib_ILLEGAL_PRIORITY, S_objLib_OBJ_ID_ERROR<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./taskLib.html#top">taskLib</a></b>, <b><i><a href="./taskLib.html#taskPriorityGet">taskPriorityGet</a></i>(&nbsp;)</b><hr><a name="taskPriorityGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>taskPriorityGet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>taskPriorityGet</i>(&nbsp;)</strong> - examine the priority of a task</p>

⌨️ 快捷键说明

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