mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 11:53:34 +08:00
uorb: do not open a node exclusively for an advertiser
Exclusive open is not required, but we now need to ensure the queue size is set atomically. It avoids a race condition between 2 single-instance advertisers, where one of them would fail to open the node with -EBUSY.
This commit is contained in:
@@ -277,9 +277,6 @@ private:
|
||||
uint8_t _queue_size; /**< maximum number of elements in the queue */
|
||||
int8_t _subscriber_count{0};
|
||||
|
||||
px4_task_t _publisher{0}; /**< if nonzero, current publisher. Only used inside the advertise call.
|
||||
We allow one publisher to have an open file descriptor at the same time. */
|
||||
|
||||
// statistics
|
||||
uint32_t _lost_messages = 0; /**< nr of lost messages for all subscribers. If two subscribers lose the same
|
||||
message, it is counted as two. */
|
||||
|
||||
Reference in New Issue
Block a user