uORB: fix TSAN issues using atomics

This commit is contained in:
Julian Oes
2026-02-18 12:43:02 +13:00
parent 91e25df7c4
commit 22a32eaa55
13 changed files with 92 additions and 75 deletions
+2 -2
View File
@@ -184,7 +184,7 @@ public:
* Make sure initialize() is called first.
* @return uORB::Manager*
*/
static uORB::Manager *get_instance() { return _Instance; }
static uORB::Manager *get_instance() { return _Instance.load(); }
/**
* Get the DeviceMaster. If it does not exist,
@@ -489,7 +489,7 @@ private: // class methods
int node_open(const struct orb_metadata *meta, bool advertiser, int *instance = nullptr);
private: // data members
static Manager *_Instance;
static px4::atomic<Manager *> _Instance;
#ifdef CONFIG_ORB_COMMUNICATOR
// the communicator channel instance.