[Xenomai] [PATCH] posix: fix pthread_mutex_timedlock for recursive mutexes.

Jeffrey Melville jmelville at mitre.org
Tue Apr 12 23:51:10 CEST 2016


Fix erroneous returns of -EBUSY when calling pthread_mutex_timedlock on
a recursive mutex already locked by the calling thread.

Signed-off-by: Jeffrey Melville <jmelville at mitre.org>
---
 src/skins/posix/mutex.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/skins/posix/mutex.c b/src/skins/posix/mutex.c
index 0cf2d8b..0323fe0 100644
--- a/src/skins/posix/mutex.c
+++ b/src/skins/posix/mutex.c
@@ -265,6 +265,7 @@ int __wrap_pthread_mutex_timedlock(pthread_mutex_t *mutex,
 			}
 
 			++shadow->lockcnt;
+			err = 0;
 			goto out;
 		}
 
-- 
1.9.1




More information about the Xenomai mailing list