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

 > +  pthread_mutex_lock( &suspendcbp->mutex );
 > +  
 > +  if ( --suspendcbp->requests_left == 0 ) {
 > +    finished = 1;
 > +  }
 > +
 > +  if ( suspendcbp->notified == AIO_NONSIGNALED ) {
 > +    send_event = 1;
 > +    suspendcbp->notified = AIO_SIGNALED;
 > +  }
 > +  
 > +  pthread_mutex_unlock( &suspendcbp->mutex );
 > +
 > +  if ( send_event ) {
 > +    rtems_event_system_send(
 > +      suspendcbp->task_id,

I looked into it, and I think it could happen. I moved that read to the top of 
the method, now it should be safe.

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


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to