jlaitine commented on PR #16301: URL: https://github.com/apache/nuttx/pull/16301#issuecomment-2846964976
Forgot to mention; another race condition which I encountered, and is fixed by this same is the management of task_state; Signal dispatching thread t1, thread to which signal is dispatched to t2: 1. t1 checks that t2 (stcb->task_state) == running 2. t1 dispatches signal to t2 3. t1 gets suspended/blocked by another thread 4. signal action gets delivered to t2 5. t2 returns from signal, continues running and blocks on semaphore 6. t1 resumes, and checks t2 task_state again (now blocked on a semaphore) 7. t1 calls nxsem_watirq on t2 (stcb) That is, it is possible that signal dispatch logic wakes up a semaphore erroneously *after* the signal was already delivered. -- 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