In various examples of waiting on some event (semaphore, queue) I see that someone is using while (very often in sys_arch.c of lwip), i.e.:
while( xSemaphoreTake( *pxSemaphore, portMAX_DELAY ) != pdTRUE );
Is it really necessary? Is it just coding style? What is the reason if portMAX_DELAY macro should wait indefinitely?