forked from Imagelibrary/rtems
posix: fix error return code for pthread_mutex_trylock
pthread_mutex_trylock() should return EBUSY if the mutex is already locked. The translations of CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED is EDEADLK which is correct for pthread_mutex_lock(). This fixes the translation for trylock. Closes #2170.
This commit is contained in:
@@ -580,8 +580,8 @@ The mutex has the protocol attribute of PTHREAD_PRIO_PROTECT and the
|
||||
priority of the calling thread is higher than the current priority
|
||||
ceiling.
|
||||
|
||||
@item EDEADLK
|
||||
The current thread already owns the mutex.
|
||||
@item EBUSY
|
||||
The mutex is already locked.
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user