RTEMS | cpukit/libio: Support close with IOP references held (!516)
Chris Johns (@chris)
gitlab at rtems.org
Mon Jun 23 00:25:06 UTC 2025
Chris Johns commented on a discussion on cpukit/libcsupport/src/libio.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/516#note_125068
> return iop;
> }
>
> -void rtems_libio_free(
> +void rtems_libio_free_iop(
> rtems_libio_t *iop
> )
> {
> size_t zero;
>
> - rtems_filesystem_location_free( &iop->pathinfo );
> + if ( !rtems_libio_iop_is_free( iop ) ) {
> + /*
> + * Clear the flags. All references should have been dropped. Free
> + * IOP have all reference count its set.
That part of the comment is old. I had been testing that approach as a way to avoid adding a free bit but it proved to be to hard to maintain an atomic state. A free bit was added.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/516#note_125068
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/20250623/685b5027/attachment.htm>
More information about the bugs
mailing list