when i look at the function vTaskDelay() i wondered about the missing entering of a critical section at the beginning of the function. The function call of vTaskSuspendAll() just increment the variable uxSchedulerSuspended, which e.g. is polled at context switch. If an timer interrupt occurs during vTaskDelay() is processed, this function would interrupted before the calling task could inserted into the list of delayed tasks. If then the timer interrupt would processed and check if there are tasks ready to run, these tasks would removed from the delayed task list and put in the ready task list.
If now the cpu returned to processing of the function where the interrupt occured, this list of delayed tasks would corrupted. I think the call of vTaskDelay() must be thread- and interrupt-safe. What do you thing about? Do you agree with my conclusion or is there anything i didn’t consider?
I’m using the AVR32 UC3 port.
Please excuse my english.