VxWorks Reference Manual : Libraries

semShow

NAME

semShow - semaphore show routines

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

DESCRIPTION

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:

INCLUDE FILES

semLib.h

SEE ALSO

semShow, semLib, VxWorks Programmer's Guide: Basic OS


Libraries : Routines

semShowInit( )

NAME

semShowInit( ) - initialize the semaphore show facility

SYNOPSIS


void semShowInit (void)

DESCRIPTION

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:

RETURNS

 N/A

SEE ALSO

semShow


Libraries : Routines

semInfo( )

NAME

semInfo( ) - get a list of task IDs that are blocked on a semaphore

SYNOPSIS

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 */
    )

DESCRIPTION

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.

WARNING

There is no guarantee that all listed tasks are still valid or that new tasks have not been blocked by the time semInfo( ) returns.

RETURNS

The number of blocked tasks placed in idList.

SEE ALSO

semShow


Libraries : Routines

semShow( )

NAME

semShow( ) - show information about a semaphore

SYNOPSIS

STATUS semShow
    (
    SEM_ID semId, /* semaphore to display */
    int    level  /* 0 = summary, 1 = details */
    )

DESCRIPTION

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

RETURNS

OK or ERROR.

SEE ALSO

semShow, VxWorks Programmer's Guide: Target Shell, windsh, Tornado User's Guide: Shell