You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/07/30 08:59:19 UTC

[GitHub] [mynewt-core] kasjer opened a new pull request #2650: os/cortex_m: Fix semaphore release hazard

kasjer opened a new pull request #2650:
URL: https://github.com/apache/mynewt-core/pull/2650


   Context switch is performed in low priority interrupt.
   If higher priority interrupt code releases semaphore
   BEFORE g_current_task is updated in context switch,
   os_sem_release() function can see that task
   that entered os_sem_pend() and initiated context switch
   is still running and there is no need to switch tasks.
   As a result task is marked as ready.
   Then high priority interrupt ends and context switch is
   finished leaving lower priority task running.
   When this happens and current task is idle it may take
   a while till reschedule is done again leaving task that
   should be running in ready state.
   
   To prevent this interrupts are now masked while context switch
   code check current task against ready list.
   Interrupts are enabled again once g_current_task is updated, rest of
   context switch may be performed (as it was) with interrupts enabled.


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

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



[GitHub] [mynewt-core] kasjer closed pull request #2650: os/cortex_m: Fix semaphore release hazard

Posted by GitBox <gi...@apache.org>.
kasjer closed pull request #2650:
URL: https://github.com/apache/mynewt-core/pull/2650


   


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

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



[GitHub] [mynewt-core] mkiiskila commented on pull request #2650: os/cortex_m: Fix semaphore release hazard

Posted by GitBox <gi...@apache.org>.
mkiiskila commented on pull request #2650:
URL: https://github.com/apache/mynewt-core/pull/2650#issuecomment-890048517


   LGTM


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

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



[GitHub] [mynewt-core] kasjer commented on pull request #2650: os/cortex_m: Fix semaphore release hazard

Posted by GitBox <gi...@apache.org>.
kasjer commented on pull request #2650:
URL: https://github.com/apache/mynewt-core/pull/2650#issuecomment-892036295


   alternative solution was accepted


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

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



[GitHub] [mynewt-core] kasjer commented on pull request #2650: os/cortex_m: Fix semaphore release hazard

Posted by GitBox <gi...@apache.org>.
kasjer commented on pull request #2650:
URL: https://github.com/apache/mynewt-core/pull/2650#issuecomment-889779854


   alternative solution #2651 


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

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