xiaoxiang781216 commented on PR #6958:
URL: https://github.com/apache/incubator-nuttx/pull/6958#issuecomment-1231282191

   > @xiaoxiang781216 the PR description states about "protection by volatile", 
but volatile just ensures that structure members are always fetched from 
memory. But in general I agree that if access to the struct is protected by a 
critical section, then the structure elements can't change its value during 
protected time. The only question is SMP case where a spin lock might be 
needed. I will take a look into this change today
   
   The critical section hold the spin lock internally in SMP. To verify the 
change doesn't have any side effect, I compare the generated code on 
sabre-6quad:smp with and without my patch.


-- 
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

Reply via email to