| 58 | } |
| 59 | |
| 60 | void MutexESP32::unlock() { |
| 61 | FL_ASSERT(mHandle != nullptr, "MutexESP32::unlock() called on null mutex"); |
| 62 | |
| 63 | SemaphoreHandle_t handle = static_cast<SemaphoreHandle_t>(mHandle); |
| 64 | |
| 65 | BaseType_t result = xSemaphoreGive(handle); |
| 66 | |
| 67 | FL_ASSERT(result == pdTRUE, "MutexESP32::unlock() failed to release mutex"); |
| 68 | } |
| 69 | |
| 70 | bool MutexESP32::try_lock() { |
| 71 | if (mHandle == nullptr) { |