jlaitine commented on code in PR #16030: URL: https://github.com/apache/nuttx/pull/16030#discussion_r2011386408
########## libs/libc/semaphore/sem_wait.c: ########## @@ -83,7 +83,12 @@ int sem_wait(FAR sem_t *sem) /* Let nxsem_wait() do the real work */ - ret = nxsem_wait(sem); + ret = nxsem_trywait_fast(sem); Review Comment: I'll try to make a version which puts the fast path directly inside nxsem_wait, nxsem_trywait and nxsem_post functions, without changes to APIs. I believe it is possible, and it would then optimize all mutex usage within libc at the same. Thanks for your input! -- 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