[Bug 1662] termios.c: semaphore not deleted, consequently resulting in failure of rtems_termios_open

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Wed Aug 11 15:47:08 UTC 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1662

Sebastian Huber <sebastian.huber at embedded-brains.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #10 from Sebastian Huber <sebastian.huber at embedded-brains.de> 2010-08-11 10:47:07 CDT ---
I think we have a bigger problem here.  Originally I thought that we can delete
a binary semaphore even if it is locked.

We see here an example of a basic RTEMS file system issue.  There is no way to
know if someone uses a file system node (in this case a driver).  For a proper
clean up sequence we must ensure that

1. exactly one thread does the clean up,
2. prior to this all activities from other threads terminated, and
3. after the clean up begin all accesses from other threads return with an
error status.

If we initiate a clean up we need cooperation from other threads.  They must
stop their activities and we have to wait for them.  Currently the last close
initiates the clean up.  This is wrong.  Instead the last user should do the
clean up in case the instance is in a certain state.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list