Allan Hessenflow commented on a discussion on cpukit/libcsupport/src/libio.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1048#note_142056 > void rtems_libio_free_iop( rtems_libio_t *iop ) > { > size_t zero; > + unsigned int flags; > > + flags = rtems_libio_iop_flags_set( iop, LIBIO_FLAGS_FREE ); > + if ( (flags & LIBIO_FLAGS_FREE ) == 0 ) { > rtems_libio_lock(); I might be missing something but I don't believe it is. That is an atomic test/set so the code inside that if() can only execute once on a non-free fd. The only code that could set the free flag cannot do so on that fd because it is not in the free list until the code inside the lock adds it. -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1048#note_142056 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
