jlaitine commented on code in PR #16194: URL: https://github.com/apache/nuttx/pull/16194#discussion_r2061255959
########## 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: why? tid is not going to change during this function. it is const in this scope. -- 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