You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "patacongo (via GitHub)" <gi...@apache.org> on 2023/09/15 02:12:54 UTC

[GitHub] [nuttx] patacongo commented on issue #9531: Thread holding spinlock can be blocked.

patacongo commented on issue #9531:
URL: https://github.com/apache/nuttx/issues/9531#issuecomment-1720389078

   > I found taking spinlock will disable interrupt and enable interrupt when releasing spinlock in zephyr project.
   > It can avoid the spinlock holder be blocked. Maybe we could follow them?
   > reference: [zephyr](https://github.com/zephyrproject-rtos/zephyr/blob/6d67a56d5b5ddb3f744eb844e6b4f7d033be7a94/include/zephyr/spinlock.h#L169)
   
   In SMP mode, disabling local interrupts will not prevent the thread from being blocked.  But locking the scheduler with sched_lock() will.
   


-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org