-
If a task is created using xTaskCreateRestricted() then the stack is provided by the application writer, and the memory used to hold the task’s data structure is automatically dynamically allocated inside the xTaskCreateRestricted() function.
-
xTaskResumeFromISR() should not be used to synchronise a task with an interrupt if there is a chance that the interrupt could arrive prior to the task being suspended – as this can lead to interrupts being missed. Use of a semaphore as a synchronisation mechanism would avoid this eventuality.
-
At some point the task wants to perform a long operation during which it does not want to get swapped out. It cannot use taskENTER_CRITICAL ()/taskEXIT_CRITICAL () as the length of the operation may cause interrupts to be missed – including the ticks. During this time interrupts will still operate and the kernel tick count will be maintained.
-
xTaskResumeAll() only resumes the scheduler. It does not unsuspend tasks that were previously suspended by a call to vTaskSuspend().
-
Why taskYIELD() is neccerry if xTaskResumeAll() does not case a context switch?
* // The operation is complete. Restart the kernel. We want to force * // a context switch - but there is no point if resuming the scheduler * // caused a context switch already. * if( !xTaskResumeAll () ) * { * taskYIELD (); * }