mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 11:31:36 +08:00
uORB: add bitset for faster orb_exists check and remove uORB::Subscription lazy subscribe hack/optimization
- add PX4 bitset and atomic_bitset with testing - add uORB::Subscription constructor to take ORB_ID enum - move orb test messages into msg/
This commit is contained in:
@@ -72,7 +72,7 @@ public:
|
||||
static_assert(__atomic_always_lock_free(sizeof(T), 0), "atomic is not lock-free for the given type T");
|
||||
#endif
|
||||
|
||||
|
||||
atomic() = default;
|
||||
explicit atomic(T value) : _value(value) {}
|
||||
|
||||
/**
|
||||
@@ -175,9 +175,9 @@ private:
|
||||
#ifdef __PX4_QURT
|
||||
// It seems that __atomic_store and __atomic_load are not supported on Qurt,
|
||||
// so the best that we can do is to use volatile.
|
||||
volatile T _value;
|
||||
volatile T _value{};
|
||||
#else
|
||||
T _value;
|
||||
T _value {};
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user