Chris Johns commented on a discussion on cpukit/libcsupport/src/libio.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/516#note_125256

 > +    /*
 > +     * Clear the flags. All references should have been dropped.
 > +     */
 > +    _Atomic_Store_uint( &iop->flags, LIBIO_FLAGS_FREE, ATOMIC_ORDER_RELAXED 
 > );
 >  
 > -  rtems_libio_lock();
 > +    rtems_filesystem_location_free( &iop->pathinfo );
 >  
 > -  /*
 > -   * Clear everything except the reference count part.  At this point in 
 > time
 > -   * there may be still some holders of this file descriptor.
 > -   */
 > -  rtems_libio_iop_flags_clear( iop, LIBIO_FLAGS_REFERENCE_INC - 1U );
 > -  zero = offsetof( rtems_libio_t, offset );
 > -  memset( (char *) iop + zero, 0, sizeof( *iop ) - zero );
 > +    rtems_libio_lock();

Re the race discussion with the flags what it the lock is held over the course 
of this function?

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/516#note_125256
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
bugs@rtems.org
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to