[RTEMS Project] #2170: pthread_mutex_trylock() erroneously returns EDEADLK

RTEMS trac trac at rtems.org
Tue Feb 24 15:30:33 UTC 2015


#2170: pthread_mutex_trylock() erroneously returns EDEADLK
--------------------------+----------------------------
 Reporter:  nick.withers  |       Owner:  joel.sherrill
     Type:  defect        |      Status:  new
 Priority:  normal        |   Milestone:  4.11
Component:  cpukit        |     Version:  4.11
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+----------------------------

Old description:

> By The Open Group Base Specifications Issue 6, pthread_mutex_trylock()
> should return EBUSY if the lock is already held (
> http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_mutex_lock.html
> ).
>
> On RTEMS 4.11, it instead returns EDEADLK

New description:

 By The Open Group Base Specifications Issue 6, pthread_mutex_trylock()
 should return EBUSY if the lock is already held (
 http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_mutex_lock.html
 ).

 On RTEMS 4.11, it instead returns EDEADLK

--

Comment (by gedare):

 The attached patch replaces EDEADLK with EBUSY directly in trylock().

--
Ticket URL: <http://devel.rtems.org/ticket/2170#comment:6>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list