This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TM4C1294KCPDT: TM4C1294KCPDT

Part Number: TM4C1294KCPDT

Tool/software: TI-RTOS

Hi,

Is there any way to know the task status in ti rtos other than Task_stat.?

Is there any way to know the deadlock condition.?

For infinite time waiting task also Task_stat will return blocking mode. For deadlock condition also return same?..

Regards

Nikhil

  • Hi Nikhil,

    Task_stat is the recommended API to determine the state of a task. The following are the valid modes:

        enum Mode {
            Mode_RUNNING,           /*! Task is currently executing. */
            Mode_READY,             /*! Task is scheduled for execution. */
            Mode_BLOCKED,           /*! Task is suspended from execution. */
            Mode_TERMINATED,        /*! Task is terminated from execution. */
            Mode_INACTIVE           /*! Task is on inactive task list */
        };

    Task_Mode_BLOCKED is used when the task is blocked on anything (e.g. Task_sleep, Semaphore_pend, Event_pend). The time that was specified in the blocking API does not impact the mode status.

    Todd

  • Hi,

    Is there any API available for checking a task is in hang or deadlock condition.?

    Regards
    Nikhil
  • The kernel cannot tell this. We can only report one of the 5 states listed above. The kernel does not know what the application is doing (or going to do), so it cannot determine a deadlock condition.

    Todd