xiaoxiang781216 commented on code in PR #22508:
URL: https://github.com/apache/nuttx/pull/22508#discussion_r4726351146


##########
sched/signal/sig_pselect.c:
##########
@@ -67,61 +68,34 @@ int pselect(int nfds, FAR fd_set *readfds, FAR fd_set 
*writefds,
             FAR fd_set *exceptfds, FAR const struct timespec *timeout,
             FAR const sigset_t *sigmask)
 {
-  FAR struct tcb_s *rtcb = this_task();
-  sigset_t saved_sigprocmask;
-  irqstate_t flags;
-  int ret = ERROR;
-
-  /* Several operations must be performed below:  We must determine if any
-   * signal is pending and, if not, wait for the signal.  Since signals can
-   * be posted from the interrupt level, there is a race condition that
-   * can only be eliminated by disabling interrupts!
-   */
+  FAR struct timeval *timeval = NULL;
+  struct timeval timeval_buf;
+  sigset_t mask;
+  int ret;
 
-  flags = enter_critical_section();
+  if (timeout)
+    {
+      timeval_buf.tv_sec  = timeout->tv_sec;
+      timeval_buf.tv_usec = (long)(timeout->tv_nsec / NSEC_PER_USEC);

Review Comment:
   remove the cast



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