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


##########
libs/libc/semaphore/sem_trywait.c:
##########
@@ -128,8 +129,9 @@ int nxsem_trywait(FAR sem_t *sem)
 #endif
       )
     {
-      int32_t old = 1;
-      return atomic_try_cmpxchg_acquire(NXSEM_COUNT(sem), &old, 0) ?
+      const int32_t tid = _SCHED_GETTID();

Review Comment:
   yes, I know, but the current code base never add const to local integer 
variables.



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