pussuw commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812206869
########## sched/semaphore/sem_destroy.c: ########## @@ -72,10 +74,18 @@ int nxsem_destroy(FAR sem_t *sem) * leave the count unchanged but still return OK. */ - if (sem->semcount >= 0) + do { - sem->semcount = 1; Review Comment: If fast mutexes are implemented the implementation should be in user space (i.e. libc) for it to benefit memory protected builds as well. There taking the lock (in our case, semaphore) is a very expensive operation via syscall. -- 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