Re: race condition in dinput's multiple joystick code and IL2

2006-07-19 Thread H. Verbeet
I didn't look at the threading issue, but there is at least one part of that patch that looks wrong to me: In joydev_enum_deviceW(): - if (id != 0) - return FALSE; + if (id >= have_joydevs) { +return -1; + } I think that should return FALSE rather than -1 (TRUE).

Re: race condition in dinput's multiple joystick code and IL2

2006-07-19 Thread Christoph Frick
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

Re: race condition in dinput's multiple joystick code and IL2

2006-07-19 Thread Robert Shearman
Christoph Frick wrote: hi there, the code i submitted some weeks ago about having more than one /dev/input/event-joystick shows from time to time a race condition in IL2 Sturmovik. this game is written in java and somehow exe-fied. so the whole thing is running a boatload of threads. my box is

race condition in dinput's multiple joystick code and IL2

2006-07-19 Thread Christoph Frick
hi there, the code i submitted some weeks ago about having more than one /dev/input/event-joystick shows from time to time a race condition in IL2 Sturmovik. this game is written in java and somehow exe-fied. so the whole thing is running a boatload of threads. my box is a smp-opteron-system with