📄 semshow.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/semShow.html - generated by refgen from semShow.c --> <title> semShow </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference : OS Libraries</i></a></p></blockquote><h1>semShow</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>semShow</strong> - semaphore show routines </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./semShow.html#semShowInit">semShowInit</a>( )</b> - initialize the semaphore show facility<br><b><a href="./semShow.html#semInfo">semInfo</a>( )</b> - get a list of task IDs that are blocked on a semaphore<br><b><a href="./semShow.html#semShow">semShow</a>( )</b> - show information about a semaphore<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides routines to show semaphore statistics, such assemaphore type, semaphore queuing method, tasks pended, etc.<p>The routine <b><a href="./semShow.html#semShowInit">semShowInit</a>( )</b> links the semaphore show facility into the VxWorkssystem. It is called automatically when the semaphore show facility isconfigured into VxWorks using either of the following methods:<ul><li></li>If you use the configuration header files, define<b>INCLUDE_SHOW_ROUTINES</b> in <b>config.h</b>.<li></li>If you use the Tornado project facility, select <b>INCLUDE_SEM_SHOW</b>.</ul><p><p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>semLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./semLib.html#top">semLib</a></b>,<i>VxWorks Programmer's Guide: Basic OS </i><hr><a name="semShowInit"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>semShowInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>semShowInit( )</strong> - initialize the semaphore show facility</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void semShowInit (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine links the semaphore show facility into the VxWorks system.It is called automatically when the semaphore show facility isconfigured into VxWorks using either of the following methods:<ul><li>If you use the configuration header files, define</li><b>INCLUDE_SHOW_ROUTINES</b> in <b>config.h</b>.<li>If you use the Tornado project facility, select <b>INCLUDE_SEM_SHOW</b>.</li></ul><p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./semShow.html#top">semShow</a></b><hr><a name="semInfo"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>semInfo( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>semInfo( )</strong> - get a list of task IDs that are blocked on a semaphore</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int semInfo ( SEM_ID semId, /* semaphore ID to summarize */ int idList[], /* array of task IDs to be filled in */ int maxTasks /* max tasks idList can accommodate */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine reports the tasks blocked on a specified semaphore.Up to <i>maxTasks</i> task IDs are copied to the array specified by <i>idList</i>.The array is unordered.<p></blockquote><h4>WARNING</h4><blockquote><p><p>There is no guarantee that all listed tasks are still valid or that newtasks have not been blocked by the time <b><a href="./semShow.html#semInfo">semInfo</a>( )</b> returns.<p></blockquote><h4>RETURNS</h4><blockquote><p>The number of blocked tasks placed in <i>idList</i>.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./semShow.html#top">semShow</a></b><hr><a name="semShow"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>semShow( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>semShow( )</strong> - show information about a semaphore</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS semShow ( SEM_ID semId, /* semaphore to display */ int level /* 0 = summary, 1 = details */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays the state and optionally the pended tasks of a semaphore.<p>A summary of the state of the semaphore is displayed as follows:<pre> Semaphore Id : 0x585f2 Semaphore Type : BINARY Task Queuing : PRIORITY Pended Tasks : 1 State : EMPTY {Count if COUNTING, Owner if MUTEX} Options : 0x1 SEM_Q_PRIORITY VxWorks Events -------------- Registered Task : 0x594f0 (t1) Event(s) to Send : 0x1 Options : 0x7 EVENTS_SEND_ONCE EVENTS_ALLOW_OVERWRITE EVENTS_SEND_IF_FREE</pre>If <i>level</i> is 1, then more detailed information will be displayed.If tasks are blocked on the queue, they are displayed in the orderin which they will unblock, as follows:<pre> Pended Tasks ------------ NAME TID PRI DELAY ---------- -------- --- ----- tExcTask 3fd678 0 21 tLogTask 3f8ac0 0 611</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./semShow.html#top">semShow</a></b>, <i>VxWorks Programmer's Guide: Target Shell, </i><b><a href="../../tornado/tools/windsh.html#top" >windsh</a></b>, <i>Tornado User's Guide: Shell</i></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -