jlaitine commented on code in PR #16194:
URL: https://github.com/apache/nuttx/pull/16194#discussion_r2074821911


##########
sched/semaphore/sem_trywait.c:
##########
@@ -63,8 +63,11 @@
 int nxsem_trywait_slow(FAR sem_t *sem)
 {
   irqstate_t flags;
-  int32_t semcount;
-  int ret;
+  int ret = -EAGAIN;
+  bool mutex = NXSEM_IS_MUTEX(sem);
+  FAR atomic_t *const val = mutex ? NXSEM_MHOLDER(sem) : NXSEM_COUNT(sem);

Review Comment:
   same comment on const as above. I'll just remove it.



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