RTEMS | cpukit/close.c: Open flag corrected for busy closes (!795)

Sebastian Huber (@sebhub) gitlab at rtems.org
Fri Oct 17 07:40:27 UTC 2025




Sebastian Huber started a new discussion on cpukit/libcsupport/src/close.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/795#note_135122

 >    }
 >  
 >    LIBIO_GET_IOP( fd, iop );
 > -  flags = rtems_libio_iop_flags( iop );
 >  
 >    while ( true ) {
 > +    unsigned int   flags;
 >      unsigned int desired;
 >      bool         success;
 > +    flags = rtems_libio_iop_flags( iop );

Reading the flags in every loop begin is unnecessary, since _Atomic_Compare_exchange_uint() returns the current flags.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/795#note_135122
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/20251017/ddac4a8c/attachment-0001.htm>


More information about the bugs mailing list