hujun260 commented on code in PR #15545:
URL: https://github.com/apache/nuttx/pull/15545#discussion_r1915867584


##########
arch/sim/src/sim/sim_usbdev.c:
##########
@@ -347,9 +350,9 @@ static void sim_reqcomplete(struct sim_ep_s *privep, 
int16_t result)
 
   /* Remove the completed request at the head of the endpoint request list */
 
-  flags = enter_critical_section();
+  flags = spin_lock_irqsave(&g_sim_usbdev.lock);

Review Comment:
   Try to avoid using global variables as much as possible.



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