Bird
0
0

Which is the correct way to get the stack high water mark of the current task in FreeRTOS?

easy📝 Syntax Q12 of 15
FreeRTOS - Debugging and Monitoring

Which is the correct way to get the stack high water mark of the current task in FreeRTOS?

?
AuxTaskGetStackHighWaterMark(NULL);
BuxTaskGetStackHighWaterMark(currentTask);
CgetStackHighWaterMark(NULL);
DuxGetStackHighWaterMark();
Step-by-Step Solution
Solution:
  1. Step 1: Recall function signature

    The FreeRTOS function to get stack high water mark is uxTaskGetStackHighWaterMark, which takes a task handle or NULL for current task.
  2. Step 2: Identify correct usage

    Passing NULL gets the current task's high water mark. Other options use wrong function names or parameters.
  3. Final Answer:

    uxTaskGetStackHighWaterMark(NULL); -> Option A
  4. Quick Check:

    Use NULL for current task in uxTaskGetStackHighWaterMark [OK]
Quick Trick: Use NULL to refer to current task handle [OK]
Common Mistakes:
  • Using wrong function names
  • Passing invalid parameters instead of NULL
  • Assuming no parameter needed

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes