pussuw commented on code in PR #14764:
URL: https://github.com/apache/nuttx/pull/14764#discussion_r1840783512


##########
mm/iob/iob_alloc.c:
##########
@@ -132,28 +207,31 @@ static FAR struct iob_s *iob_allocwait(bool throttled, 
unsigned int timeout)
    * we are waiting for I/O buffers to become free.
    */
 
-  flags = enter_critical_section();
-
   /* Try to get an I/O buffer.  If successful, the semaphore count will be
    * decremented atomically.
    */
 
-  start = clock_systime_ticks();
-  iob   = iob_tryalloc(throttled);
-  while (ret == OK && iob == NULL)
+  flags = spin_lock_irqsave(&g_iob_lock);

Review Comment:
   Move between line 209-210 to place it under the matching comment



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