From the course: Introduction to FreeRTOS and Basic Task Management

Unlock the full course today

Join today to access over 25,200 courses taught by industry experts.

The task priority functions

The task priority functions

- [Instructor] Let's discuss how to manage task priorities dynamically using the key functions provided to us by FreeRTOS. Let's start with vTaskPrioritySet. This function is used to modify the priority of an existing task dynamically. This function has two parameters. The first parameter is the xTask, and this is the handle of the task whose priority we want to modify. The second parameter is the uxNewPriority, and this is the new priority we want to assign to the task. Next, we have the function for getting the task priority. This is the uxTaskPriorityGet function. This function takes a single parameter. This parameter is the xTask, and it is the handle of the task whose priority we want to access. The return value of this function is the priority of the task.

Contents