FreeRTOS - Design Patterns for RTOS
Given this watchdog task snippet:
What is the main problem with this code?
void WatchdogTask(void *pvParameters) {
for (;;) {
if (xSemaphoreTake(watchdogSemaphore, 0) == pdTRUE) {
// Reset received
} else {
// No reset, take action
}
vTaskDelay(pdMS_TO_TICKS(1000));
}
}What is the main problem with this code?
