www.beck-ipc.com

@CHIP-RTOS C Library - RTOS API


RTX_Get_Task_State_Ext

Get state of a task specified by name.

int RTX_Get_Task_State_Ext ( const char far *taskname,
                             unsigned int far *taskstate,
                             int far *error );

Parameters

taskname

Input parameter:  Pointer to 4 character unique name tag of the task whose state information is desired.

taskstate

Output parameter:   Pointer to 16 bit word which will receive task state bit field defined below.

error

Output parameter:  Pointer to 16 bit word to receive error code indicator: 0 on success, else error code.

Return Value

-1 ==> Failure, error code was output to error
Other ==> Task ID

Comments

The taskstate bit field is coded as follows:
    B0: timer wait (used with other bits)
    B1: trigger wait (i.e. idle)
    B2: semaphore wait
    B3: event group wait
    B4: message exchange wait
    B5: message send wait
    B6: suspended (waiting for resume)
    B7: waiting for wakeup

    B8 - B15 internal use only

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

Related Topics

RTX API   Overview
MEM shell command

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    V1.01V1.00V1.00V0.90V1.00

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document