VxWorks Reference Manual : Libraries
semShow - semaphore show routines
semShowInit( ) - initialize the semaphore show facility
semInfo( ) - get a list of task IDs that are blocked on a semaphore
semShow( ) - show information about a semaphore
This library provides routines to show semaphore statistics, such as semaphore type, semaphore queuing method, tasks pended, etc.
The routine semShowInit( ) links the semaphore show facility into the VxWorks system. It is called automatically when the semaphore show facility is configured into VxWorks using either of the following methods:
- If you use the configuration header files, define INCLUDE_SHOW_ROUTINES in config.h.
- If you use the Tornado project facility, select INCLUDE_SEM_SHOW.
semLib.h
semShow, semLib, VxWorks Programmer's Guide: Basic OS
semShowInit( ) - initialize the semaphore show facility
void semShowInit (void)
This routine links the semaphore show facility into the VxWorks system. It is called automatically when the semaphore show facility is configured into VxWorks using either of the following methods:
- If you use the configuration header files, define INCLUDE_SHOW_ROUTINES in config.h.
- If you use the Tornado project facility, select INCLUDE_SEM_SHOW.
N/A
semInfo( ) - get a list of task IDs that are blocked on a semaphore
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 */ )
This routine reports the tasks blocked on a specified semaphore. Up to maxTasks task IDs are copied to the array specified by idList. The array is unordered.
There is no guarantee that all listed tasks are still valid or that new tasks have not been blocked by the time semInfo( ) returns.
The number of blocked tasks placed in idList.
semShow( ) - show information about a semaphore
STATUS semShow ( SEM_ID semId, /* semaphore to display */ int level /* 0 = summary, 1 = details */ )
This routine displays the state and optionally the pended tasks of a semaphore.
A summary of the state of the semaphore is displayed as follows:
Semaphore Id : 0x585f2 Semaphore Type : BINARY Task Queuing : PRIORITY Pended Tasks : 1 State : EMPTY {Count if COUNTING, Owner if MUTEX}If level is 1, then more detailed information will be displayed. If tasks are blocked on the queue, they are displayed in the order in which they will unblock, as follows:NAME TID PRI DELAY ---------- -------- --- ----- tExcTask 3fd678 0 21 tLogTask 3f8ac0 0 611
OK or ERROR.
semShow, VxWorks Programmer's Guide: Target Shell, windsh, Tornado User's Guide: Shell