Kernel APC in Wine?

Joerg-Cyril.Hoehle at Joerg-Cyril.Hoehle at
Mon Nov 15 08:17:09 CST 2010


my WINMM callback tests (cf. bug #3930, comments 37+38) showed that
most MOM_ callbacks were executed in my own thread!  The only way I
know how to achieve this is to use an APC as in QueueUserAPC().

However, reading MSDN again, it seems like user-mode APC are never
invoked unless the app uses the Wait*Ex() functions instead of the
regular ones likes WaitForMultipleObjects() or Sleep().  As I can't
expect a random app to use these, I assume that either
 - something confused me and I'm on the wrong track, or
 - native's winmm uses kernel APC, not user ones, and kernel APC are
   invoked even with plain Wait* calls, or
 - user APC are executed with plain Sleep/Wait*() (non ~Ex) too.

Does Wine have something like kernel APC?

What other mechanism exist that could allow a player loop inside WINMM
to invoke callbacks in the application's thread context?

BTW, I find it's a good idea from MS to execute callbacks in the
caller's thread.  This avoids common pitfalls and nasty bugs.

Is there potential trouble with APC in Wine on 64 bit?  MSDN
recommends against posting an APC to a thread in another process.

Thank you for your help,
	Jörg Höhle

More information about the wine-devel mailing list