http://bugs.winehq.org/show_bug.cgi?id=30807
Bug #: 30807 Summary: Thread IDs are &~3 (multiples of 4) on Windows. Application presumes this behavior and fails Product: Wine Version: unspecified Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: aj664@hotmail.com Classification: Unclassified
On Win7-64(and i suspect -32 on NT,2k,XP,Vista) the Thread ID's are all multiples of 4. This "feature" is used within an application. Wine currently produces thread ID values multiples of 1. Here is some Microsoft Insider chatter about it: http://blogs.msdn.com/b/oldnewthing/archive/2008/02/28/7925962.aspx
I would like to see Wine changed to only issue Thread ID values as multiples of 4, in line with how Windows works. Granted there are no official reasons why thread IDs should be multiples of 4, but given this has been the behavior of the NT kernel from as far back as, well, NT! it seems like something that should be done for maximum compatibility. Without this, applications that have presumed this multiple will have very subtle bugs, something not easily detected.