JianyuWang0623 commented on code in PR #16992:
URL: https://github.com/apache/nuttx/pull/16992#discussion_r2335512120


##########
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:
   @acassis @linguini1  Okay. Let's rephrase this another way without 
separating the if/else.
   The patch has been updated. Please help review it when you have time.



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to