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


##########
sched/semaphore/sem_wait.c:
##########
@@ -218,6 +271,16 @@ int nxsem_wait_slow(FAR sem_t *sem)
 #endif
     }
 
+  /* If this now holds the mutex, set the holder TID and the lock bit */
+
+  if (mutex && ret == OK)

Review Comment:
   I don't see a race here, I'm asking if there can be one since I know that 
for counting semaphores the holder is set in nxsem_wait_irq and in sem_post, 
presumably for reasons. This is different from that.
   
   You wrote this code, I don't know how it works. I cant tell by looking at it 
for ~30 minutes either. This is why I ask questions, since you know the 
implementation better.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to