Each task is assigned a priority from 0 to (configMAX_PRIORITIES – 1 ), (configMAX_PRIORITIES is defined in FreeRTOSConfig.h).
Low priority numbers denote low priority tasks. The idle task has priority zero (tskIDLE_PRIORITY).
The task placed into the Running state by the scheduler is always the highest priority task that is able to run – higher priority tasks in the Ready or Running state will always be given processor (CPU) time in preference to tasks of a lower priority that are also in the ready state.
Any number of tasks can share the same priority. If configUSE_TIME_SLICING is not defined, or if configUSE_TIME_SLICING is set to 1, then Ready state tasks of equal priority will share the available processing time using a time sliced round robin scheduling scheme.
(tskIDLE_PRIORITY + 1) (configMAX_PRIORITIES -1 ) //-1 is the maximum priority available