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.

EK-TM4C123GXL: get the block cause of the OS task

Part Number: EK-TM4C123GXL
Other Parts Discussed in Thread: SYSBIOS

Hello,

I'm wondering if there is an API in the sys/bios that can retrieve the cause of blocking in the OS tasK?

Thanks,

Mohammed

  • Hi,

      What do you mean by blocking? SYSBIOS always executes the highest priority task that is 'ready' to run.  So if you have 2 task with different priority, the lower priority task will only get to run whenever the higher priority task blocks.  The lower priority task does not block the higher priority task.  The higher priority task can block itself by calling Semaphore_pend(), When a Semaphore_post() is called, the higher priority task will be made ready and should run again. So you need to check if a task is blocked because it is pending waiting for a post event. Again, I'm not aware of an API that will tell why a task is blocked. Below page shows all the task related API. The task_stat() can return the status of a task but it doesn't tell why it is blocked. I'm not aware of an API that can report the cause of a blocked task. 

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/sysbios/6_35_03_47/exports/bios_6_35_03_47/docs/cdoc/ti/sysbios/knl/Task.html