[vlc-devel] [PATCH] VLM : move a mutex lock/unlock + deadlock question

Rémi Denis-Courmont rem at videolan.org
Fri Mar 26 18:17:46 CET 2010


On Thursday 18 March 2010 12:44:29 Sébastien Escudier, you wrote:
> Correct me if I am wrong, but I think we could save some useless
>  lock/unlock calls in VLM manage thread. See attached patch.

Applied, thanks.

> lock p_vlm->lock
> vlm_ControlMediaDel
> vlm_ControlMediaInstanceStop
> vlm_MediaInstanceDelete
> var_DelCallback
> [...]
> 
> But if the input triggered a callback between the lock and var_DelCallback,
>  then input thread is blocked in the callback while var_DelCallback is
>  blocked in var_DelCallback -> WaitUnused
> 
> Any idea ?

There is no generic "solution" to dead locks. It's pretty much case-by-case. 
But you are right in the sense that there is a problem here.

-- 
Rémi Denis-Courmont



More information about the vlc-devel mailing list