Anything like traceMOVED_TASK_TO_BLOCKED_STATE?

alexander5245 wrote on Thursday, March 28, 2019:

Hi. I’m having a problem where a task unexpectedly gets moved to a blocked state. I’d like to track down the cause by writing a hook or setting a breakpoint. I know there’s a traceMOVED_TASK_TO_READY_STATE hook, but I need the opposite, a traceMOVED_TASK_TO_BLOCKED_STATE, which doesn’t seem to exit.

Is there a hook by a different name that is essentially traceMOVED_TASK_TO_BLOCKED_STATE? Or is there a specific line of code I could set a breakpoint at or write some test code?

I’m using FreeRTOS v8 on a PIC32.

Thank you,
Bob

rtel wrote on Thursday, March 28, 2019:

I’m not sure there is such a thing as there are individual macros per
RTOS primitive that can put a task into the blocked state - so you know
why it entered the blocked state too. If you cannot use the trace tool
as is to see when your task enters the blocked state then you could try
adding something into the prvAddCurrentTaskToDelayedList() function,
which is where a task is moved from the running state to a blocked list.