Bird
0
0

What is wrong with this usage of xTaskNotify()?

medium📝 Debug Q7 of 15
FreeRTOS - Task Notifications

What is wrong with this usage of xTaskNotify()?

uint32_t value = 0;
xTaskNotify(taskHandle, value, 5);
AThe third parameter must be a valid eNotifyAction enum value
BThe value parameter cannot be zero
CThe task handle must be a pointer to a pointer
DxTaskNotify requires four parameters
Step-by-Step Solution
Solution:
  1. Step 1: Check third parameter type

    The third parameter must be an eNotifyAction enum, not an integer like 5.
  2. Step 2: Validate other parameters

    Value can be zero, task handle is correct, and xTaskNotify takes three parameters.
  3. Final Answer:

    The third parameter must be a valid eNotifyAction enum value -> Option A
  4. Quick Check:

    Third parameter = eNotifyAction enum [OK]
Quick Trick: Third parameter must be eNotifyAction enum [OK]
Common Mistakes:
  • Passing integer instead of enum for action
  • Thinking zero value is invalid
  • Expecting more parameters than required

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes