: [PATCH 1/6] winmm: Check callback flags prior to opening a driver. (#3)

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Fri Apr 1 07:01:38 CDT 2011


Hi,

Here's the final version, tested on a w2k machine too.
It appears that w2k behaves like xp and later.

+        /* NOTSUPPORTED is not broken, but it enables the todo_wine marker. */
+        todo_wine
+        ok(rc == MMSYSERR_NOERROR /* since w2k */ ||
+           broken(rc == MMSYSERR_NOTSUPPORTED), /* 98 */
I consider NOTSUPPORTED (what w9x returns) a reasonable behavior
for Wine until it implements CALLBACK_EVENT and _THREAD.  Marking
the result broken is not an invitation for Austin to remove that
w9x code, but rather a reminder visible in test results via
todo_wine that there's an incompatibility with w2k and newer systems.

I believe broken() is a useful marker for rejecting with Wine behavior
acceptable with MS-Windows, e.g. when several result values are possible.


My guess why CALLBACK_FUNCTION is still rejected while _EVENT and _THREAD
are accepted since w2k is that MS got enough headaches with the direct
invocation of callbacks, while delivering events and messages is
void of problems -- as long as winmm is thread-safe.

Unfortunately in Wine, I've seen traces where the driver is
pre-empted as soon as SetEvent or PostMessage is called, unsurprisingly.
As a result, the app resumes execution before winmm was
done with the driver call, perhaps in not yet a consistent state.
That's why it's still important to invoke DriverCallback as late as possible
-- and to make winmm largely thread-safe, somehow.

Regards,
 Jörg höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-winmm-Check-callback-flags-prior-to-opening-a-drive.patch
Type: application/octet-stream
Size: 8713 bytes
Desc: 0001-winmm-Check-callback-flags-prior-to-opening-a-drive.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20110401/94477bcd/attachment-0001.obj>


More information about the wine-patches mailing list