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

Philippe Gerum rpm at xenomai.org
Thu Apr 14 09:50:25 CEST 2016


On 04/12/2016 11:51 PM, Jeffrey Melville wrote:
> 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;
>  		}
>  
> 

Merged, thanks.

-- 
Philippe.



More information about the Xenomai mailing list