From 3bfb699f09a1edb974d27ed64bf6db0d3461e807 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 21 Feb 2015 12:01:06 +0100 Subject: [PATCH] Added patch to implement ntoskrnl.KeInitializeMutex. --- README.md | 3 +- debian/changelog | 1 + ...krnl.exe-Implement-KeInitializeMutex.patch | 31 +++++++++++++++++++ patches/ntoskrnl-Stubs/definition | 1 + patches/patchinstall.sh | 2 ++ 5 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 patches/ntoskrnl-Stubs/0015-ntoskrnl.exe-Implement-KeInitializeMutex.patch diff --git a/README.md b/README.md index 7057cfa8..d293f677 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Wine. All those differences are also documented on the Included bug fixes and improvements =================================== -**Bugfixes and features included in the next upcoming release [14]:** +**Bugfixes and features included in the next upcoming release [15]:** * Add semi-stub for GetFileVersionInfoExA/W ([Wine Bug #38098](https://bugs.winehq.org/show_bug.cgi?id=38098)) * Add semi-stub for GetFileVersionInfoSizeExA/W ([Wine Bug #38090](https://bugs.winehq.org/show_bug.cgi?id=38090)) @@ -52,6 +52,7 @@ Included bug fixes and improvements * Do not access stack below ESP when restoring thread context. * Ignore unsupported alpha channels in TIFF decoder ([Wine Bug #38027](https://bugs.winehq.org/show_bug.cgi?id=38027)) * Implement D3DXGetShaderOutputSemantics +* Implement ntoskrnl.KeInitializeMutex * Improve stubs for AEV_{Get,Set}MasterVolumeLevel * Improve stubs for AEV_{Get,Set}Mute diff --git a/debian/changelog b/debian/changelog index ee80e6f2..b5c6911b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ wine-staging (1.7.37) UNRELEASED; urgency=low * Added patch to implement semi-stub for GetFileVersionInfoExA/W. * Added patch to ignore unsupported alpha channels in TIFF decoder. * Added patch to add stub for ntoskrnl.Mm{Map,Unmap}LockedPages. + * Added patch to implement ntoskrnl.KeInitializeMutex. * Removed patches for UTF7 support (accepted upstream). * Removed patches for SIO_ADDRESS_LIST_CHANGE ioctl (accepted upstream). * Removed patch for IApplicationAssociationRegistration::QueryCurrentDefault (accepted upstream). diff --git a/patches/ntoskrnl-Stubs/0015-ntoskrnl.exe-Implement-KeInitializeMutex.patch b/patches/ntoskrnl-Stubs/0015-ntoskrnl.exe-Implement-KeInitializeMutex.patch new file mode 100644 index 00000000..cd8104f7 --- /dev/null +++ b/patches/ntoskrnl-Stubs/0015-ntoskrnl.exe-Implement-KeInitializeMutex.patch @@ -0,0 +1,31 @@ +From e08f2a919e3f1f8129d4f40d0a9232c363e4da2b Mon Sep 17 00:00:00 2001 +From: Alexander Morozov +Date: Fri, 30 Jan 2015 01:06:36 +0100 +Subject: ntoskrnl.exe: Implement KeInitializeMutex. + +--- + dlls/ntoskrnl.exe/ntoskrnl.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c +index 10957e8..3ff5d63 100644 +--- a/dlls/ntoskrnl.exe/ntoskrnl.c ++++ b/dlls/ntoskrnl.exe/ntoskrnl.c +@@ -1356,7 +1356,13 @@ void WINAPI KeInitializeEvent( PRKEVENT Event, EVENT_TYPE Type, BOOLEAN State ) + */ + void WINAPI KeInitializeMutex(PRKMUTEX Mutex, ULONG Level) + { +- FIXME( "stub: %p, %u\n", Mutex, Level ); ++ TRACE( "%p, %u\n", Mutex, Level ); ++ RtlZeroMemory( Mutex, sizeof(KMUTEX) ); ++ Mutex->Header.Type = 2; ++ Mutex->Header.Size = 8; ++ Mutex->Header.SignalState = 1; ++ InitializeListHead( &Mutex->Header.WaitListHead ); ++ Mutex->ApcDisable = 1; + } + + +-- +2.3.0 + diff --git a/patches/ntoskrnl-Stubs/definition b/patches/ntoskrnl-Stubs/definition index 22df9f05..deb0a331 100644 --- a/patches/ntoskrnl-Stubs/definition +++ b/patches/ntoskrnl-Stubs/definition @@ -8,3 +8,4 @@ Fixes: Add stub for ntoskrnl.ExAcquireResourceExclusiveLite Fixes: Add stub for ntoskrnl.ExReleaseResourceForThread Fixes: Add stub for ntoskrnl.ExDeleteResourceLite Fixes: Add stub for ntoskrnl.Mm{Map,Unmap}LockedPages +Fixes: Implement ntoskrnl.KeInitializeMutex diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 8c7b09ad..ba8e075d 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -2375,6 +2375,7 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then patch_apply ntoskrnl-Stubs/0012-ntoskrnl.exe-Add-stub-for-ExReleaseResourceForThread.patch patch_apply ntoskrnl-Stubs/0013-ntoskrnl.exe-Add-stub-for-ExDeleteResourceLite.patch patch_apply ntoskrnl-Stubs/0014-ntoskrnl.exe-Implement-MmMapLockedPages-and-MmUnmapL.patch + patch_apply ntoskrnl-Stubs/0015-ntoskrnl.exe-Implement-KeInitializeMutex.patch ( echo '+ { "Sebastian Lackner", "include: Remove several duplicate definitions from ntdef.h.", 1 },'; echo '+ { "Austin English", "ntoskrnl.exe: add KeWaitForMultipleObjects stub.", 1 },'; @@ -2390,6 +2391,7 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then echo '+ { "Christian Costa", "ntoskrnl.exe: Add stub for ExReleaseResourceForThreadLite.", 1 },'; echo '+ { "Christian Costa", "ntoskrnl.exe: Add stub for ExDeleteResourceLite.", 1 },'; echo '+ { "Christian Costa", "ntoskrnl.exe: Implement MmMapLockedPages and MmUnmapLockedPages.", 1 },'; + echo '+ { "Alexander Morozov", "ntoskrnl.exe: Implement KeInitializeMutex.", 1 },'; ) >> "$patchlist" fi