Bird
0
0

Which of the following is the correct way to create a mutex with priority inheritance in FreeRTOS?

easy📝 Syntax Q3 of 15
FreeRTOS - Task Scheduling
Which of the following is the correct way to create a mutex with priority inheritance in FreeRTOS?
AvTaskDelay()
BxSemaphoreCreateMutex()
CxTaskCreate()
DxSemaphoreCreateBinary()
Step-by-Step Solution
Solution:
  1. Step 1: Identify API for mutex with priority inheritance

    FreeRTOS provides xSemaphoreCreateMutex() to create a mutex that supports priority inheritance.
  2. Step 2: Eliminate other options

    xSemaphoreCreateBinary creates a binary semaphore without priority inheritance; xTaskCreate creates tasks; vTaskDelay delays tasks.
  3. Final Answer:

    xSemaphoreCreateMutex() -> Option B
  4. Quick Check:

    Mutex creation = D [OK]
Quick Trick: Use xSemaphoreCreateMutex for priority inheritance mutex [OK]
Common Mistakes:
  • Using binary semaphore instead of mutex
  • Confusing task creation with mutex creation
  • Trying to delay tasks to fix priority issues

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes