Bug in vTaskDelete since v 4.0.2

nobody wrote on Wednesday, June 28, 2006:

(PC Port)
The task which calls “vTaskEndScheduler” is always regarded as the task in progress by the function “vTaskDelete”!!
Thus, the call to “vTaskDelete” causes an error for this task.
My solution at the end of vTaskDelete:
/***************************************/
/* Only if scheduler running */
if( xSchedulerRunning != pdFALSE )
{
/* Force a reschedule if we have just deleted the current task. */
  if( ( void * ) pxTaskToDelete == NULL )
  {
      taskYIELD();
  }
}

Raynald.

rtel wrote on Monday, July 03, 2006:

Thanks.  I have made the change you suggest.

Regards.