RE: RE:Baffling KeReleaseMutex() and STATUS_MUTANT_NOT_OWNED Exceptions

There have been special semantics for certain wait reasons back for many, many releases (I only looked as far back as NT 3.51); the specific semantics and their associated situations used within the kernel have varied over the years, however. In general, these aren’t semantics that are useful other than as internal hints within the kernel itself for certain conditions, so they’re not exposed in the set of documented wait reasons that should generally be used with the wait services.

  • S (Msft)

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@osr.com
Sent: Tuesday, January 01, 2013 2:42 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Baffling KeReleaseMutex() and STATUS_MUTANT_NOT_OWNED Exceptions

I realize you’re referencing two specific wait reasons… but for the archives and completeness: Until a few years back (errrr, Vista maybe?) there was never any behavioral difference in the OS regarding wait reason EVER. In past code, I had code which took advantage of this fact by using an unusual wait reason for things like waiting threads in worker thread pools – this made finding those threads in a crash dump fast and easy.

However, IIRC, the wait reason is now significant in some cases… so, best to follow the guidance which has always existed and use “Executive” or whatever.

Peter
OSR


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer