dinput: Delete the static critical section when unloading the dll.
fgouget at codeweavers.com
Thu Nov 17 02:49:54 CST 2011
On Wed, 16 Nov 2011, Vitaliy Margolen wrote:
> On 11/16/2011 08:31 AM, Francois Gouget wrote:
> > ---
> > I moved DllMain() to the end of the file so it comes after the variable
> > declaration.
> It's already forward declared few lines after DllMain(). So you should move
> that declaration instead.
I think it makes more sense to move DllMain() to the end of the file
since nothing is going to need it before. But it may also make sense to
move the critical section declaration up to where it is declared
> On the side note, why do we need to delete statically allocated
> critical section in the first place?
To make sure the corresponding (NT) semaphore or native locking entity
gets released (futexes reportedly don't need it but maybe mach
semaphores or others do).
Note that there are still a lot of critical sections (static and not)
that are not ever released. I only did the easy ones.
Francois Gouget <fgouget at codeweavers.com>
More information about the wine-devel