From 73278a047bbde890e741cfb8eb9ba87cdfd5b2a2 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Tue, 28 Oct 2025 09:49:36 +0000 Subject: [PATCH] AP_HAL: add UARTDriver::is_owned_by_current_thread() --- libraries/AP_HAL/UARTDriver.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/AP_HAL/UARTDriver.h b/libraries/AP_HAL/UARTDriver.h index 91134d48288..4f41822e41a 100644 --- a/libraries/AP_HAL/UARTDriver.h +++ b/libraries/AP_HAL/UARTDriver.h @@ -220,6 +220,9 @@ public: return lock_write_key != 0; } + // check that the current thread owns the uart making certain operations possible + virtual bool is_owned_by_current_thread() const { return true; } + protected: // key for a locked port uint32_t lock_write_key;