posix: fix pthread_mutex_timedlock for recursive mutexes.
PATCH 1/1 posix: fix pthread_mutex_timedlock for recursive mutexes.
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 <[email protected]>
--- src/skins/posix/mutex.c | 1 + 1 file changed, 1 insertion(+)
src/skins/posix/mutex.c +1 -0
@@ -265,6 +265,7 @@ int __wrap_pthread_mutex_timedlock(pthread_mutex_t *mutex, } ++shadow->lockcnt; + err =0 ; goto out; }
Signature · 1 line
1.9.1
Quoted 14 lines · Jeffrey Melville
Fix erroneous returns of
-EBUSYwhen callingpthread_mutex_timedlockon a recursive mutex already locked by the calling thread.Signed-off-by Jeffrey Melville <[email protected]>--- src/skins/posix/mutex.c | 1 + 1 file changed, 1 insertion(+)src/skins/posix/mutex.c +0
-0
src/skins/posix/mutex.c int __wrap_pthread_mutex_timedlock(pthread_mutex_t *mutex, · line 271
Quoted 7 lines
src/skins/posix/mutex.c +1
-0@@ -265,6 +265,7 @@ int __wrap_pthread_mutex_timedlock(pthread_mutex_t *mutex, } ++shadow->lockcnt; + err =0 ; goto out; }
Good catch, thanks. Fortunately this does not affect 3.x.
Signature · 1 line
Philippe.
Philippe Gerum
AppliedQuoted 14 lines · Jeffrey Melville
Fix erroneous returns of
-EBUSYwhen callingpthread_mutex_timedlockon a recursive mutex already locked by the calling thread.Signed-off-by Jeffrey Melville <[email protected]>--- src/skins/posix/mutex.c | 1 + 1 file changed, 1 insertion(+)src/skins/posix/mutex.c +0
-0
src/skins/posix/mutex.c int __wrap_pthread_mutex_timedlock(pthread_mutex_t *mutex, · line 271
Quoted 7 lines
src/skins/posix/mutex.c +1
-0@@ -265,6 +265,7 @@ int __wrap_pthread_mutex_timedlock(pthread_mutex_t *mutex, } ++shadow->lockcnt; + err =0 ; goto out; }
Merged, thanks.
Signature · 1 line
Philippe.