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


##########
libs/libc/semaphore/sem_trywait.c:
##########
@@ -67,7 +67,12 @@ int sem_trywait(FAR sem_t *sem)
 
   /* Let nxsem_trywait do the real work */
 
-  ret = nxsem_trywait(sem);
+  ret = nxsem_trywait_fast(sem);

Review Comment:
   move nxsem_trywait_fast into nxsem_trywait



##########
libs/libc/semaphore/sem_wait.c:
##########
@@ -83,7 +83,12 @@ int sem_wait(FAR sem_t *sem)
 
   /* Let nxsem_wait() do the real work */
 
-  ret = nxsem_wait(sem);
+  ret = nxsem_trywait_fast(sem);

Review Comment:
   should we move nxsem_trywait_fast into nxsem_wait



##########
libs/libc/semaphore/sem_post.c:
##########
@@ -75,7 +75,12 @@ int sem_post(FAR sem_t *sem)
       return ERROR;
     }
 
-  ret = nxsem_post(sem);
+  ret = nxsem_post_fast(sem);
+  if (ret != OK)
+    {
+      ret = nxsem_post(sem);

Review Comment:
   ditto



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