[vlc-devel] [PATCH 1/2] win32: implement non-recursive locks

Rémi Denis-Courmont remi at remlab.net
Fri Jun 24 09:15:54 CEST 2016

Le 2016-06-24 08:33, Steve Lhomme a écrit :
> So we can catch un-matched unlocks. Also if we don't we can end up in
> harder to decypher blocking issues. Here's the doc of
> LeaveCriticalSection()
> "If a thread calls LeaveCriticalSection when it does not have
> ownership of the specified critical section object, an error occurs
> that may cause another thread using EnterCriticalSection to wait
> indefinitely."

Yeah and the counter does not "fix" that problem. You obviously would 
need to track the owner ID to detect and fix that error.

Rémi Denis-Courmont

More information about the vlc-devel mailing list