Fix-Point commented on PR #17640:
URL: https://github.com/apache/nuttx/pull/17640#issuecomment-3685928541

   > Why was critical section changed back from spinlock? Weren't you 
optimizing SMP performance?
   
   There's a functional correctness issue here, so we have no way but to revert 
to the critical sections.
   
   >After modifying the critical section, the execution of the WDOG callback 
function is no longer atomic. This inevitably introduces a new state: 
`WDOG_INACTIVE | shared`. In this state, even though `wdog->func == NULL`, 
**its ownership does not belong to the user thread**, as shown in Figure 2. If 
the user repurposes the WDOG memory space at this moment, a race condition 
occurs.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to