Bird
0
0

Which of the following is the correct way to create a task in FreeRTOS?

easy📝 Syntax Q12 of 15
FreeRTOS - Task Creation and Management
Which of the following is the correct way to create a task in FreeRTOS?
AxTaskCreate(TaskFunction, "TaskName", StackSize, NULL, Priority, &TaskHandle);
BCreateTask(TaskFunction, Priority, StackSize);
Ctask_create(TaskFunction, StackSize, Priority);
DStartTask(TaskFunction, "TaskName", Priority);
Step-by-Step Solution
Solution:
  1. Step 1: Recall the FreeRTOS task creation function

    The correct function to create a task is xTaskCreate with parameters: function, name, stack size, parameters, priority, and handle.
  2. Step 2: Compare options with correct syntax

    Only xTaskCreate(TaskFunction, "TaskName", StackSize, NULL, Priority, &TaskHandle); matches the exact syntax and parameter order of xTaskCreate.
  3. Final Answer:

    xTaskCreate(TaskFunction, "TaskName", StackSize, NULL, Priority, &TaskHandle); -> Option A
  4. Quick Check:

    Correct function and parameters = xTaskCreate(TaskFunction, "TaskName", StackSize, NULL, Priority, &TaskHandle); [OK]
Quick Trick: Remember xTaskCreate with 6 parameters for tasks [OK]
Common Mistakes:
  • Using wrong function names like CreateTask
  • Mixing parameter order
  • Omitting task handle parameter

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes