Bird
0
0

How do you correctly call vTaskPrioritySet() to assign priority 3 to a task handle named xHandle?

easy📝 Syntax Q3 of 15
FreeRTOS - Task Priorities

How do you correctly call vTaskPrioritySet() to assign priority 3 to a task handle named xHandle?

AvTaskPrioritySet(xHandle, 3);
BvTaskPrioritySet(3, xHandle);
CvTaskPrioritySet(&xHandle, 3);
DvTaskPrioritySet(xHandle, &3);
Step-by-Step Solution
Solution:
  1. Step 1: Check function signature

    vTaskPrioritySet(TaskHandle_t xTask, UBaseType_t uxNewPriority) expects task handle first, then priority.
  2. Step 2: Validate options

    vTaskPrioritySet(xHandle, 3); matches correct parameter order and types.
  3. Final Answer:

    vTaskPrioritySet(xHandle, 3); -> Option A
  4. Quick Check:

    Task handle first, priority second [OK]
Quick Trick: Task handle first, priority second in call [OK]
Common Mistakes:
  • Swapping parameter order
  • Passing address of variables incorrectly
  • Using incorrect data types

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes