anjiahao1 opened a new pull request #5070: URL: https://github.com/apache/incubator-nuttx/pull/5070
Signed-off-by: anjiahao <anjia...@xiaomi.com> Semaphores are generally used in two ways, one is to protect shared resources, the other is to use as a mutual exclusion lock In Nuttx, the default behavior of semaphores is mutual exclusion lock. I think it is better to change the default behavior to protect shared resources, and it will be more general in Linux programs. In nuttx, there are many calls to nxsem_init, this is an example. Why would I do this: In porting some Linux programs, the semaphore is used to protect resources, but its default signal is a mutual exclusion lock(nuttx). When two threads are waiting for the semaphore, one of the threads gets the semaphore and exits, which will cause another A holder that accesses the semaphore will cause a crash, and the default behavior is used to protect resources, so the holder will not be added -- 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