Bird
0
0

In FreeRTOS, what is the effect of calling vTaskDelete(NULL) inside a running task?

easy📝 Conceptual Q1 of 15
FreeRTOS - Task Creation and Management
In FreeRTOS, what is the effect of calling vTaskDelete(NULL) inside a running task?
AIt deletes all tasks in the system.
BIt deletes the currently executing task.
CIt causes a system reset.
DIt deletes the idle task.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the parameter NULL

    Passing NULL to vTaskDelete() means the function targets the calling task.
  2. Step 2: Effect of deleting the current task

    The current task is removed from the scheduler and its resources are freed.
  3. Final Answer:

    It deletes the currently executing task. -> Option B
  4. Quick Check:

    NULL means current task [OK]
Quick Trick: vTaskDelete(NULL) deletes the calling task [OK]
Common Mistakes:
  • Thinking it deletes all tasks
  • Assuming it deletes the idle task
  • Believing it causes a system reset

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes