Bug in vTaskDelete since v 4.0.2

(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.

Bug in vTaskDelete since v 4.0.2

Thanks.  I have made the change you suggest. Regards.