[RTEMS Project] #3975: RTEMS 5 : sem_wait + sem_destroy behavior change

RTEMS trac trac at rtems.org
Thu May 7 11:19:44 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        |   Keywords:
Blocked By:                |   Blocking:
---------------------------+--------------------
 Hello,

 With previous versions of RTEMS:
 a blocking sem_wait() could be broken immediately via a successful
 sem_destroy done from another thread (sem_wait deblocks with return code
 -1, and errno == EINVAL).

 With latest RTEMS:
 sem_destroy doesn't succeed anymore, but returns EBUSY (since another
 thread executes a wait on it)

 This behavior change breaks some of existing code.

 Would it be possible to add an RTEMS config to allow user to select
 between OLD and NEW behavior ? (alternative is to move from POSIX sems to
 classic API and use rtems_semaphore_flush).

 Thanks,
 Andrei Lupas.

--
Ticket URL: <http://devel.rtems.org/ticket/3975>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list