aviralgarg05 commented on PR #18288:
URL: https://github.com/apache/nuttx/pull/18288#issuecomment-3831382133

   > @aviralgarg05 thank you for the logs! In the future, please include that 
information in your testing section.
   > 
   > Your explanation doesn't really make sense to me. Why does the idle task 
try to wait on a semaphore only in the LVGL demo? Doesn't this assertion 
indicate that the problem is with something in the LVGL configuration, since no 
other NuttX code encounters this issue?
   
   @linguini1 
   
   From what I understand, the Idle task in the simulator is running the host 
event loop (input/display), so it’s effectively behaving like a driver thread. 
Since these drivers use standard APIs, they’re protected by mutexes.
   
   Earlier, the assertion was basically asking “Am I calling a wait function?”, 
which meant even safe, instant atomic acquisitions were blocked. The fix 
changes that logic to instead ask “Am I actually going to sleep?”.
   
   With this change, it seems okay for the Idle task to grab a free semaphore 
through the fast/atomic path, since that doesn’t block and is safe. But if it 
tries to wait on a busy semaphore and goes down the slow path, we still panic — 
which keeps the safety guarantees intact.
   


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