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

Alessandro Nardin (@AlessandroNardin) gitlab at rtems.org
Wed Jul 17 13:23:23 UTC 2024




Alessandro Nardin commented on a discussion on cpukit/posix/src/aio_misc.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/118#note_109431

 > +    case SIGEV_SIGNAL:
 > +      result = sigqueue(
 > +        getpid(),
 > +        sig->sigev_signo,
 > +        sig->sigev_value
 > +      );
 > +      if ( result != 0 ){
 > +      }
 > +      break;
 > +
 > +    case SIGEV_THREAD:
 > +      pthread_t thread;
 > +      pthread_attr_t *attr = sig->sigev_notify_attributes;;
 > +
 > +      if ( sig->sigev_notify_function == NULL ){
 > +        //handle error

Yes, it was one of my main doubts.
I added a function to check if the sigevent struct is valid. My plan is to call this function in aio_read, aio_write, and aio_sync, and return an error if the struct is invalid. I was uncertain if this was the right approach because it is not mentioned in the POSIX specification.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/118#note_109431
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/20240717/fbb1f205/attachment.htm>


More information about the bugs mailing list