Bird
0
0

Which of the following is the correct syntax to call vTaskDelayUntil() inside a task loop?

easy📝 Syntax Q3 of 15
FreeRTOS - Task Scheduling
Which of the following is the correct syntax to call vTaskDelayUntil() inside a task loop?
AvTaskDelayUntil(&lastWakeTime, &delayTicks);
BvTaskDelayUntil(lastWakeTime, &delayTicks);
CvTaskDelayUntil(&lastWakeTime, delayTicks);
DvTaskDelayUntil(lastWakeTime, delayTicks);
Step-by-Step Solution
Solution:
  1. Step 1: Understand parameter types

    vTaskDelayUntil() expects a pointer to TickType_t for last wake time and a tick count value for delay.
  2. Step 2: Match correct argument passing

    The first argument must be address of lastWakeTime (&lastWakeTime), second argument is delayTicks (value).
  3. Final Answer:

    vTaskDelayUntil(&lastWakeTime, delayTicks); -> Option C
  4. Quick Check:

    Pointer first, value second [OK]
Quick Trick: Pass pointer to lastWakeTime, value for delay [OK]
Common Mistakes:
  • Passing lastWakeTime by value instead of pointer
  • Passing delayTicks by pointer
  • Swapping argument order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes