(Mis)using threads
Eric Pouech
eric.pouech at wanadoo.fr
Tue Mar 11 15:06:42 CST 2003
Florian Schirmer wrote:
> Hi,
>
> I've some major trouble with wine's thread implementation. We're porting a
> soundprocessing application to linux/wine. (It will run as Win32 app under
> wine in the first step). Sadly the wine thread implementation and/or the
> sheduler does not get the priorities right. The mission critical sound task
> will not get as much attention as it needs.
>
> We've tried some hacks to improve it (increasing linux kernel priorities
> using set_sheduler/set_priorities) but this doesn't really fix the problem.
> Then we tried to make it even more ugly by creating a own thread using the
> clone() system call. This fixed the timeslice problem but opens up other
> strange problems. (Random crashes here and there). Most likely due to
> missing lock issues or something like that.
>
> I would appreciate any hints which could make things run more smoothly!
> Basically 2 ways are left to go:
>
> 1. Fix the wine sheduler to obey priorities
> 2. Fix the thread (locking?) issues
>
> Thanks a lot for any information!
I wouldn't go for fixing the thread... Wine internals need to know when
a thread is started, so using clone "in its back" will inevitabely lead
to what you've seen => crashes around (except if the thread running
clone doesn't do any Win32 calls, which I doubt if you're porting your app)
so, 1/ may be a better approach (which actually isn't implemented). And
it should use information from the Win32 thread API.
A+
--
Eric Pouech
More information about the wine-devel
mailing list