In case it matters I’m using the AVR32 UC3A port.
While in one task I’m calling vTaskDelete to delete a different task. It happens my code to make the vTaskDelete call is within a short taskENTER_CRITICAL section. I see at the end of the vTaskDelete function a taskYield request. My code would still have this within a taskCRITICAL section (due to the nested taskCRITICAL calls). Is this okay?
As I think about this further … it seems the act of the taskYIELD call (at the end of the vTaskDelete function) could actually cause a context switch and therefore defeat the purpose of my CRITICAL section. But since we are in a CRITICAL section [by my doing] no event (an interrupt) could’ve taken place that would set up an an actual task yield. I think the task yield section at the end of the vTaskDelete function is primarily for when a task deletes itself (because I suspect you never return from the vTaskDelete function in that case).
So the first paragraph is my real question.
Any comments appreciated.
I sure am enjoying freeRTOS. Seriously!