MCPcopy Create free account
hub / github.com/FastLED/FastLED / notify_all

Method notify_all

src/platforms/esp/32/condition_variable_esp32.cpp.hpp:109–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109void ConditionVariableESP32::notify_all() FL_NOEXCEPT {
110 if (mMutex == nullptr || mWaitQueue == nullptr) {
111 return;
112 }
113
114 SemaphoreHandle_t mutex = static_cast<SemaphoreHandle_t>(mMutex);
115 QueueHandle_t queue = static_cast<QueueHandle_t>(mWaitQueue);
116
117 // Lock internal mutex
118 xSemaphoreTake(mutex, portMAX_DELAY);
119
120 // Wake all waiting tasks
121 WaitingTask waiter;
122 while (xQueueReceive(queue, &waiter, 0) == pdTRUE) {
123 waiter.notified = true;
124 xTaskNotifyGive(waiter.task);
125 }
126
127 // Unlock internal mutex
128 xSemaphoreGive(mutex);
129}
130
131//=============================================================================
132// Template Method Implementations

Callers 2

FL_TEST_FILEFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected