Complete the code to create a recursive mutex in FreeRTOS.
SemaphoreHandle_t xMutex = xSemaphoreCreate[1]Mutex();Use xSemaphoreCreateRecursiveMutex() to create a recursive mutex in FreeRTOS.
Complete the code to take the recursive mutex safely.
if(xSemaphoreTakeRecursive(xMutex, [1]) == pdTRUE) { // Critical section }
Use portMAX_DELAY to wait indefinitely for the mutex.
Fix the error in releasing the recursive mutex.
xSemaphore[1]Recursive(xMutex);Use xSemaphoreGiveRecursive() to release a recursive mutex.
Fill both blanks to create and take a recursive mutex with a timeout of 50 ticks.
SemaphoreHandle_t xMutex = xSemaphoreCreate[1]Mutex(); if(xSemaphoreTakeRecursive(xMutex, [2]) == pdTRUE) { // Critical section }
Create the mutex with xSemaphoreCreateRecursiveMutex() and take it with a 50 tick timeout.
Fill all three blanks to create a recursive mutex, take it with max delay, and then release it.
SemaphoreHandle_t xMutex = xSemaphoreCreate[1]Mutex(); if(xSemaphoreTakeRecursive(xMutex, [2]) == pdTRUE) { // Critical section xSemaphore[3]Recursive(xMutex); }
Create the recursive mutex, take it with portMAX_DELAY, and release it with xSemaphoreGiveRecursive().
