GUIDINGLI commented on a change in pull request #4782:
URL: https://github.com/apache/incubator-nuttx/pull/4782#discussion_r748350090



##########
File path: sched/semaphore/sem_trywait.c
##########
@@ -69,10 +69,6 @@ int nxsem_trywait(FAR sem_t *sem)
   irqstate_t flags;
   int ret;
 
-  /* This API should not be called from interrupt handlers */

Review comment:
       Then, there is one question, why user can't call nxsem_trywait from 
interrupt context ?
   There is no harmful, even on SMP mode.
   nxsem_trywait only look at the sem count, it will NOT wait all.
   If someone use nxsem_trywait, and nxsem_post before the IRQ exit, that's the 
normal thing I think.




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