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
2026-06-18 20:54:37 +12:00
committed by Ramon Roche
parent 6aae566ea1
commit 53b138e38c

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);