linguini1 commented on code in PR #16992:
URL: https://github.com/apache/nuttx/pull/16992#discussion_r2335113063
##########
drivers/mtd/mtd_config_fs.c:
##########
@@ -1989,6 +1992,34 @@ static int nvs_next(FAR struct nvs_fs *fs,
return OK;
}
+/****************************************************************************
+ * Name: mtdconfig_notify
+ ****************************************************************************/
+
+static void mtdconfig_notify(FAR struct nvs_fs *fs, pollevent_t eventset)
+{
+ /* Is there any waiter? Yes, and notify them directly. */
+
+ if (fs->fds)
+ {
+ poll_notify(&fs->fds, 1, eventset | fs->events);
+ fs->events = 0;
+ }
+
+ /* No, events are saved for the following scenarios.
+ *
+ * a. Events that have changed but not been waited for before being
+ * added to the interest list.
+ * b. Events that occur after `epoll_wait()` returns and before it is
+ * called again.
+ */
Review Comment:
I actually like separating if/else blocks with a comment if the comment only
logically applies to the `else`. I find it cleaner than putting the comment
inside the indented block. But I'm not picky enough to have a strong stance!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]