Assert on priority


I made a boo boo on a call to xTaskCreate where I somehow managed to set the prio to the same value as the stack size that happend to be 208. As my configMAX_PRIORITIES was set to 9 this reduced my prio on the task to 8 and everything work the way it was intended to according to the documentation of xTaskCreate. Basically, if you set a way too high prio, it will be reduced to the highest allowed in the system. However the vTaskPrioritySet function does the same thing but it also includes a call configASSERT( ( uxNewPriority < configMAX_PRIORITIES ) ); Could that assert not also be added to xTaskCreate?

Best regards

Agree that would be a good idea. If you would like this update right away you can create a pull request here: - otherwise we will update for the next release.

Added this in this PR: Add assert to catch invalid task priority by aggarg · Pull Request #292 · FreeRTOS/FreeRTOS-Kernel · GitHub