race condition in dinput's multiple joystick code and IL2

Christoph Frick frick at sc-networks.de
Wed Jul 19 08:34:04 CDT 2006


On Wed, Jul 19, 2006 at 02:03:06PM +0100, Robert Shearman wrote:

Hi Robert,

thanks for your comments.

> >so what i have tried so far:
> >- put find_joydevs into a critical section
> This should work. Why don't you share the patch you used to do this? 

because i have dumped it, after there where no success ;)

it was basically like this: put a crititcal section and the _debug stuff
(stolen from another dll) in the file and call Enter/Leave on the
start/end of the find_joydevs method.

> Note that none of the data in JoystickImpl is protected by that
> critical section and maybe it should be.

in general i dont really like the idea of calling find_joydevs every
time it *might* be needed and i would prefer to go a way like
registering also hooks in the dinput-implementations to allow the
devices to "find themself" on dinput.dll's startup (add a init-method
where the enum/create hooks are). this is what i would have tried next
(and i guess still will). there i can put a critical secion also.

-- 
cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060719/e48ed41b/attachment.pgp


More information about the wine-devel mailing list