diff options
3 files changed, 5 insertions, 3 deletions
diff --git a/pw_sync_freertos/public/pw_sync_freertos/binary_semaphore_inline.h b/pw_sync_freertos/public/pw_sync_freertos/binary_semaphore_inline.h index 8a3562a6e..d666080e3 100644 --- a/pw_sync_freertos/public/pw_sync_freertos/binary_semaphore_inline.h +++ b/pw_sync_freertos/public/pw_sync_freertos/binary_semaphore_inline.h @@ -29,7 +29,9 @@ inline BinarySemaphore::BinarySemaphore() : native_type_() { PW_DASSERT(native_type_.handle != nullptr); } -inline BinarySemaphore::~BinarySemaphore() { vSemaphoreDelete(&native_type_); } +inline BinarySemaphore::~BinarySemaphore() { + vSemaphoreDelete(native_type_.handle); +} inline void BinarySemaphore::release() { if (interrupt::InInterruptContext()) { diff --git a/pw_sync_freertos/public/pw_sync_freertos/counting_semaphore_inline.h b/pw_sync_freertos/public/pw_sync_freertos/counting_semaphore_inline.h index 9a3e95bce..0dc116d45 100644 --- a/pw_sync_freertos/public/pw_sync_freertos/counting_semaphore_inline.h +++ b/pw_sync_freertos/public/pw_sync_freertos/counting_semaphore_inline.h @@ -31,7 +31,7 @@ inline CountingSemaphore::CountingSemaphore() : native_type_() { } inline CountingSemaphore::~CountingSemaphore() { - vSemaphoreDelete(&native_type_); + vSemaphoreDelete(native_type_.handle); } inline void CountingSemaphore::acquire() { diff --git a/pw_sync_freertos/public/pw_sync_freertos/mutex_inline.h b/pw_sync_freertos/public/pw_sync_freertos/mutex_inline.h index 9ae4b7a14..4c8fe6cbe 100644 --- a/pw_sync_freertos/public/pw_sync_freertos/mutex_inline.h +++ b/pw_sync_freertos/public/pw_sync_freertos/mutex_inline.h @@ -29,7 +29,7 @@ inline Mutex::Mutex() : native_type_() { PW_DASSERT(native_type_.handle != nullptr); } -inline Mutex::~Mutex() { vSemaphoreDelete(&native_type_); } +inline Mutex::~Mutex() { vSemaphoreDelete(native_type_.handle); } inline void Mutex::lock() { PW_ASSERT(!interrupt::InInterruptContext()); |