From 322bad3fd95d1046208f2fa1a7fb3dfdc4a81b82 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 19 Jan 2020 08:57:22 +1100 Subject: [PATCH] AP_Baro: make all semaphores recursive the cost is very similar and this prevents an easy coding error which can occur on less used code paths --- libraries/AP_Baro/AP_Baro.h | 2 +- libraries/AP_Baro/AP_Baro_Backend.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Baro/AP_Baro.h b/libraries/AP_Baro/AP_Baro.h index 47a767b216..bf30d78968 100644 --- a/libraries/AP_Baro/AP_Baro.h +++ b/libraries/AP_Baro/AP_Baro.h @@ -255,7 +255,7 @@ private: AP_Int32 _baro_probe_ext; // semaphore for API access from threads - HAL_Semaphore_Recursive _rsem; + HAL_Semaphore _rsem; }; namespace AP { diff --git a/libraries/AP_Baro/AP_Baro_Backend.h b/libraries/AP_Baro/AP_Baro_Backend.h index 82b8e7aaea..7ae28dc90d 100644 --- a/libraries/AP_Baro/AP_Baro_Backend.h +++ b/libraries/AP_Baro/AP_Baro_Backend.h @@ -30,7 +30,7 @@ protected: void _copy_to_frontend(uint8_t instance, float pressure, float temperature); // semaphore for access to shared frontend data - HAL_Semaphore_Recursive _sem; + HAL_Semaphore _sem; virtual void update_healthy_flag(uint8_t instance);