[RTEMS Project] #3975: RTEMS 5 : sem_wait + sem_destroy behavior change
RTEMS trac
trac at rtems.org
Fri May 8 04:51:39 UTC 2020
#3975: RTEMS 5 : sem_wait + sem_destroy behavior change
--------------------------+---------------------
Reporter: andrei.lupas | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: admin | Version: 5
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: |
--------------------------+---------------------
Comment (by Sebastian Huber):
The "The effect of destroying a semaphore upon which other threads are
currently blocked is undefined." is the current sem_destroy() description.
The POSIX semaphores are now self-contained. This means the storage space
is provided and maintained by the user. Destruction of a semaphore in use
could indicate that someone is trying to use an object while it is
destroyed (e.g. deallocated).
What we could do (since "The effect of destroying a semaphore upon which
other threads are currently blocked is undefined.") is to flush the
semaphore so that callers get woken up with EINVAL, we destroy the object
and return EBUSY.
--
Ticket URL: <http://devel.rtems.org/ticket/3975#comment:4>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list