in many FreeRTOS examples, i have seen code like this:
while( xQueueReceive( queue, &mess, portMAX_DELAY ) != pdPASS );
i was wondering if this is efficient in the sense that it blocks the thread until a message is posted
or this instruction implies a true active polling and hence consumes CPU time.
is there any efficient way to do this?
the obvious solution that come to mind is to use a binarysemaphore to signal that a message has been posted,
so the receiving thread can stop on the sempahore and only when woken up receive the message.
any other solution?