Bird
0
0

Which of the following is the correct syntax to create a binary semaphore in FreeRTOS?

easy📝 Syntax Q3 of 15
FreeRTOS - Debugging and Monitoring
Which of the following is the correct syntax to create a binary semaphore in FreeRTOS?
AvSemaphoreCreateBinary();
BxSemaphoreCreateMutex();
CxSemaphoreCreateBinary();
DxQueueCreateBinary();
Step-by-Step Solution
Solution:
  1. Step 1: Recall FreeRTOS semaphore creation functions

    FreeRTOS uses xSemaphoreCreateBinary() to create a binary semaphore.
  2. Step 2: Identify correct function name

    Other options are either mutex creation or invalid function names.
  3. Final Answer:

    xSemaphoreCreateBinary(); -> Option C
  4. Quick Check:

    Binary semaphore creation = D [OK]
Quick Trick: Binary semaphore created with xSemaphoreCreateBinary() [OK]
Common Mistakes:
  • Confusing mutex creation with binary semaphore
  • Using invalid function names
  • Assuming queue functions create semaphores

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More FreeRTOS Quizzes