Reactos

[SDK] Improve definition of (RTL_)CRITICAL_SECTION_DEBUG

+40 -14
+1 -1
dll/win32/kernel32/wine/profile.c
··· 103 103 { 104 104 0, 0, &PROFILE_CritSect, 105 105 { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, 106 - 0, 0, 0 106 + 0, 0, { 0 } 107 107 }; 108 108 static RTL_CRITICAL_SECTION PROFILE_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 }; 109 109
-4
dll/win32/kernel32/winnls/string/lcformat.c
··· 126 126 0, 0, &NLS_FormatsCS, 127 127 { &NLS_FormatsCS_debug.ProcessLocksList, 128 128 &NLS_FormatsCS_debug.ProcessLocksList }, 129 - #ifdef __REACTOS__ 130 - 0, 0, 0 131 - #else 132 129 0, 0, { (DWORD_PTR)(__FILE__ ": NLS_Formats") } 133 - #endif 134 130 }; 135 131 static CRITICAL_SECTION NLS_FormatsCS = { &NLS_FormatsCS_debug, -1, 0, 0, 0, 0 }; 136 132
+17 -1
sdk/include/ndk/rtltypes.h
··· 1423 1423 LIST_ENTRY ProcessLocksList; 1424 1424 ULONG EntryCount; 1425 1425 ULONG ContentionCount; 1426 - ULONG Spare[2]; 1426 + union 1427 + { 1428 + ULONG_PTR WineDebugString; 1429 + ULONG_PTR Spare[1]; 1430 + struct 1431 + { 1432 + ULONG Flags; 1433 + USHORT CreatorBackTraceIndexHigh; 1434 + USHORT SpareWORD; 1435 + }; 1436 + }; 1427 1437 } RTL_CRITICAL_SECTION_DEBUG, *PRTL_CRITICAL_SECTION_DEBUG, RTL_RESOURCE_DEBUG, *PRTL_RESOURCE_DEBUG; 1438 + 1439 + #ifdef _WIN64 1440 + C_ASSERT(sizeof(RTL_CRITICAL_SECTION_DEBUG) == 0x30); 1441 + #else 1442 + C_ASSERT(sizeof(RTL_CRITICAL_SECTION_DEBUG) == 0x20); 1443 + #endif 1428 1444 1429 1445 typedef struct _RTL_CRITICAL_SECTION 1430 1446 {
+11 -5
sdk/include/psdk/winbase.h
··· 908 908 LIST_ENTRY ProcessLocksList; 909 909 DWORD EntryCount; 910 910 DWORD ContentionCount; 911 - //#ifdef __WINESRC__ //not all wine code is marked so 912 - DWORD_PTR Spare[8/sizeof(DWORD_PTR)];/* in Wine they store a string here */ 913 - //#else 914 - //WORD SpareWORD; 915 - //#endif 911 + union 912 + { 913 + DWORD_PTR WineDebugString; 914 + DWORD_PTR Spare[1]; 915 + struct 916 + { 917 + DWORD Flags; 918 + WORD CreatorBackTraceIndexHigh; 919 + WORD SpareWORD; 920 + }; 921 + }; 916 922 } CRITICAL_SECTION_DEBUG,*PCRITICAL_SECTION_DEBUG,*LPCRITICAL_SECTION_DEBUG; 917 923 918 924 typedef struct _CRITICAL_SECTION {
+11 -3
sdk/include/xdk/winnt_old.h
··· 2791 2791 LIST_ENTRY ProcessLocksList; 2792 2792 DWORD EntryCount; 2793 2793 DWORD ContentionCount; 2794 - DWORD Flags; 2795 - WORD CreatorBackTraceIndexHigh; 2796 - WORD SpareWORD; 2794 + union 2795 + { 2796 + DWORD_PTR WineDebugString; 2797 + DWORD_PTR Spare[1]; 2798 + struct 2799 + { 2800 + DWORD Flags; 2801 + WORD CreatorBackTraceIndexHigh; 2802 + WORD SpareWORD; 2803 + }; 2804 + }; 2797 2805 } RTL_CRITICAL_SECTION_DEBUG, *PRTL_CRITICAL_SECTION_DEBUG, RTL_RESOURCE_DEBUG, *PRTL_RESOURCE_DEBUG; 2798 2806 2799 2807 #include "pshpack8.h"