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

Gedare Bloom (@gedare) gitlab at rtems.org
Tue Nov 5 21:20:05 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_114378

 > +  suspendcb *suspendcbp;
 > +  int result, op_num;
 > +
 > +  /* CONTROLS OVER INVALID PARAMETERS */
 > +  if ( list == NULL ){
 > +    rtems_set_errno_and_return_minus_one( EINVAL );
 > +  }
 > +
 > +  if ( nent <= 0 ) {
 > +    rtems_set_errno_and_return_minus_one( EINVAL );
 > +  }
 > +
 > +  /* INITAILIZE SUSPEND CB */
 > +  suspendcbp = malloc( sizeof( suspendcb ) );
 > +  if ( suspendcbp == NULL ) {
 > +    rtems_set_errno_and_return_minus_one( EAGAIN );

The failure case here is that the system is out of memory, so `ENOMEM` is a more clear error condition.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/275#note_114378
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/e1d35c9a/attachment-0001.htm>


More information about the bugs mailing list