perf(uORB): skip poll_notify() on publish without poll waiters

Assisted-by: Claude:claude-fable-5-1
This commit is contained in:
Lourens Naude authored and Beat Küng committed 2026-10-22 08:26:26 +02:00
1 parent 427bf69cdd
commit 9d65ba66ae
2 files changed
+14 -2

No files matched your search

+6 -2
View File
@@ -204,10 +204,14 @@ uORB::DeviceNode::write(cdev::file_t *filp, const char *buffer, size_t buflen)
/* Mark at least one data has been published */
_data_valid = true;
// Snapshot under the lock: poll() setup registers and self-checks under it too.
const bool notify_pollers = has_poll_waiters();
ATOMIC_LEAVE;
/* notify any poll waiters */
poll_notify(POLLIN);
if (notify_pollers) {
poll_notify(POLLIN);
}
return _meta->o_size;
}