refactor(uORB): drop redundant lock around the atomic _advertised store

DeviceNode::open() took the cdev lock only to call mark_as_advertised(), but
_advertised is a px4::atomic, so the single store needs no lock. (Suggested in
review.)
This commit is contained in:
Julian Oes authored and Ramon Roche committed 2026-07-02 08:42:49 -07:00
1 parent 6aae566ea1
commit 53b138e38c
1 file changed
+1 -2
+1 -2
View File
@@ -76,9 +76,8 @@ uORB::DeviceNode::open(cdev::file_t *filp)
/* is this a publisher? */
if (filp->f_oflags == PX4_F_WRONLY) {
lock();
// _advertised is atomic, so no lock is needed around this single store
mark_as_advertised();
unlock();
/* now complete the open */
return CDev::open(filp);