RTEMS | Draft: posix/aio: Implemented aio_suspend() (!275)

Gedare Bloom (@gedare) gitlab at rtems.org
Tue Nov 5 21:21:42 UTC 2024




Gedare Bloom commented on a discussion on cpukit/posix/src/aio_suspend.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/275#note_114379

 > +      current = (rtems_aio_request *) node;
 > +
 > +      while ( !rtems_chain_is_tail( fd_chain, node ) && current->aiocbp != list[i] ) {
 > +        node = rtems_chain_next( node );
 > +        current = (rtems_aio_request *) node;
 > +      }
 > +      
 > +      if ( !rtems_chain_is_tail( fd_chain, node ) ){
 > +        if ( current->suspendcbp == NULL ) {
 > +          current->suspendcbp = suspendcbp;
 > +        }
 > +        suspendcbp->requests_left++;
 > +      }
 > +
 > +      //REQUEST NOT PRESENT
 > +      continue;

ok I got confused by the levels of indentation. However, this is an indicator the function may be a little complicated. Refactoring it may help.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/275#note_114379
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20241105/a2331a57/attachment.htm>


More information about the bugs mailing list