- Provide an option for a file system to support close wtih
references held. This can happen in more complex file systems
and file descriptor handling with more complete reference
handling implementations where an fd can hold other fds and
close can be call on any fd and succeed.
- Fix open IOP leaks in the error paths.
- Provide better definition of the IOP flags to help clarify
the code.
Fixes#5201
There was a race conditon in the reference counting of file descriptors
during a close() operation. After the call to the close handler, the
rtems_libio_free() function cleared the flags to zero. However, at this
point in time there may still exist some holders of the file descriptor.
With RTEMS_DEBUG enabled this could lead to failed assertions in
rtems_libio_iop_drop().
Change the code to use only atomic read-modify-write operations on the
rtems_libio_iop::flags.
- Remove the printf support leaving the direct printk support configured
with TESTS_USE_PRINTK and all other output goes via a buffered vsniprintf
call to printk.
- Control the test's single init for functions and global data with
TEST_INIT and not CONFIGURE_INIT. They are now separate.
Updates #3170.