is there any simple way to extend FreeRTOS
semaphores to add nesting? Like in:
xSemaphoreTake(s, portMAX_DELAY); /* obtains s */
xSemaphoreTake(s, portMAX_DELAY); /* does not deadlock! */
xSemaphoreGive(s); /* does not free s */
xSemaphoreGive(s); /* really frees s */
I tried to implement it on top of FreeRTOS semaphores, but it’s quite tricky.