RTEMS | Draft: posix/aio: Implemented aio_suspend() (!275)
Alessandro Nardin (@AlessandroNardin)
gitlab at rtems.org
Mon Nov 4 20:18:51 UTC 2024
Alessandro Nardin commented on a discussion on cpukit/posix/src/aio_misc.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/275#note_114324
> +
> + pthread_mutex_lock( &suspendcbp->mutex );
> + --suspendcbp->requests_left;
> +
> + if ( suspendcbp->notified == AIO_NONSIGNALED ) {
> + rtems_event_system_send(
> + suspendcbp->task_id,
> + RTEMS_EVENT_SYSTEM_AIO_SUSPEND
> + );
> + suspendcbp->notified = AIO_SIGNALED;
> + }
> +
> + pthread_mutex_unlock( &suspendcbp->mutex );
> +
> + if( suspendcbp->requests_left == 0 ) {
> + free( suspendcbp );
You're right, now it should be safe.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/275#note_114324
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/20241104/9002e5ba/attachment.htm>
More information about the bugs
mailing list