how the priority is assigned to a task

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?

how the priority is assigned to a task

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.