anonymous wrote on Tuesday, April 29, 2008:
Richard Barry et al
In a previous release, the following code was placed in VTaskDelete()
___/* Ensure a yield is performed if the current task is being
___if( pxTaskToDelete == pxCurrentTCB )
___pxTaskToDelete = NULL;
This ensures that a task can properly delete itself using its own task handle rather than NULL.
I thought similar code was also added to vTaskPrioritySet() although so far I have been unable to pin this down. Maybe I had added that myself. But the bottom line is that such code is needed. In the current version, if a task drops its own priority (using its task handle rather than NULL) below another ready task, the other ready task will not be properly scheduled to run (until the next re-scheduling for some other reason).