how the priority is assigned to a task

juhc wrote on Wednesday, June 24, 2015:

Hello,

I’m searching for the definition of the function xTaskCreate() to see how the priority is assigned to a task when it is created. I couldn’t find it in tasks.c
Does anyone know where this function is defined and how the scheduler assign the priorities?

rtel wrote on Wednesday, June 24, 2015:

http://www.freertos.org/a00125.html
http://www.freertos.org/RTOS-task-priority.html

The function is a macro, which calls xTaskGenericCreate(), but the above links provide the information.