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

Alessandro Nardin (@AlessandroNardin) gitlab at rtems.org
Mon Nov 11 09:42:51 UTC 2024




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

 > +    rtems_set_errno_and_return_minus_one( EAGAIN );
 > +  }
 > +
 > +  result = pthread_mutex_init( &suspendcbp->mutex, NULL );
 > +  if ( result != 0 ) {
 > +    free( suspendcbp );
 > +    rtems_set_errno_and_return_minus_one( EAGAIN );
 > +  }
 > +
 > +  pthread_mutex_lock( &suspendcbp->mutex );
 > +  suspendcbp->requests_left = 0;
 > +  suspendcbp->task_id = rtems_task_self();
 > +  suspendcbp->notified = AIO_NONSIGNALED;
 > +
 > +  /* LOCK REQUEST QUEUE */
 > +  pthread_mutex_lock( &aio_request_queue.mutex );

I lock them both only in here, so there should be no issues.

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


More information about the bugs mailing list