GUIDINGLI commented on code in PR #21943:
URL: https://github.com/apache/nuttx/pull/21943#discussion_r4609225132


##########
fs/vfs/fs_epoll.c:
##########
@@ -1019,18 +1020,28 @@ int epoll_pwait(int epfd, FAR struct epoll_event *evs,
       goto out;
     }
 
+  /* Set the mask for the whole wait.  Without signals, there is no mask to
+   * set.  A pending signal that the mask unblocks stops the call at once.
+   * The critical section closes the window from this test to the wait.
+   */
+
+#ifndef CONFIG_DISABLE_ALL_SIGNALS
+  flags = enter_critical_section();

Review Comment:
   why must use enter_critical_section ? can we use other lock or non-lock ?



-- 
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]

Reply via email to