RTEMS | Draft: cpukit/posix/aio*: Create notification at request completion (!118)

Joel Sherrill (@joel) gitlab at rtems.org
Fri Jul 19 16:50:03 UTC 2024



Merge request https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/118 was reviewed by Joel Sherrill

--
  
Joel Sherrill commented on a discussion on testsuites/psxtests/psxaio04/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/118#note_109617

 > +}
 > +
 > +

OK. aio_buf is oddly "volatile void *" in the POSIX standard and our aio.h. The cast is needed to remove the volatile part because free() expects just a "void *"

There is still the issue of a space after the method name.

--
  
Joel Sherrill started a new discussion on testsuites/psxtests/psxaio03/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/118#note_109618

 >  {
 > -  free( (char*) aiocbp->aio_buf );
 > +  free( (char*)aiocbp->aio_buf );

Change cast to (void *).

--
  
Joel Sherrill started a new discussion on cpukit/posix/src/aio_misc.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/118#note_109619

 > +  #ifdef RTEMS_POSIX_API
 > +  int result;
 > +  if (sig == NULL) { return; }

Formatting plus a blank lins above is needed.

--
  
Joel Sherrill commented on a discussion on cpukit/posix/src/aio_misc.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/118#note_109620

 > +        sig->sigev_value
 > +      );
 > +      if ( result != 0 ){

I'm sorry that I didn't think this this earlier. You can use "(void) result;" to indicate you are explicitly not checking the result.

--
  
Joel Sherrill started a new discussion on cpukit/posix/src/aio_misc.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/118#note_109621

 > +      }
 > +
 > +      if ( attr == NULL ){

I think this should be attr != NULL. Otherwise you are passing in NULL.

And use the "(void) result;" idiom instead of the if...do nothing

--
  
Joel Sherrill started a new discussion on testsuites/psxtests/psxaio04/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/118#note_109622

 > +void free_aiocb( struct aiocb *aiocbp )
 > +{
 > +  free ((char*) aiocbp->aio_buf);

Use (void *) as per https://pubs.opengroup.org/onlinepubs/009695399/functions/free.html




-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/118
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/20240719/065212ff/attachment-0001.htm>


More information about the bugs mailing list