fjpanag commented on PR #9064:
URL: https://github.com/apache/nuttx/pull/9064#issuecomment-1518746953

   Hmm, thinking of it again, I don't think that this PR is actually needed:
   
   1. The work is queued (no network unlock yet).
   2. This task is scheduled out, and eventually another worker starts the 
scheduled job (`stm32_txtimeout_work`).
   3. It finds that the network is locked, and it is preempted.
   4. Execution returns to `stm32_interrupt_work()`, it unlocks the network and 
exits.
   5. Execution can now return to `stm32_txtimeout_work()` with the network 
unlocked.
   
   So nothing wrong can happen. No dead-locks or similar issues.  
   Maybe leave it as is, and not introduce uneccesary code?
   
   In fact the exact same condition is true for `stm32_txavail()`. It schedules 
a job with the network locked.  
   It can easily be preempted before it has the chance to unlock the network.
   
   I think that no problems were ever observed with `stm32_txavail()`, but if 
this fix is actually needed, then both functions need to be fixed. 
   
   @davids5 once again your insight would be very helpful.


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