Added patch to improve various ntoskrnl stub functions.

This commit is contained in:
Sebastian Lackner 2015-02-08 17:55:46 +01:00
parent 221a419640
commit c81eb4cfa6
5 changed files with 84 additions and 0 deletions

1
debian/changelog vendored
View File

@ -18,6 +18,7 @@ wine-staging (1.7.36) UNRELEASED; urgency=low
* Added patch to implement stubs for ntoskrnl.Ex{Acquire,Release}FastMutexUnsafe.
* Added patch to implement stubs for ntoskrnl.ObReferenceObjectByPointer and ntoskrnl.ObDereferenceObject.
* Added patch to implement stub for ntoskrnl.KeDelayExecutionThread.
* Added patch to improve various ntoskrnl stub functions.
* Removed patch to add additional tests for SLGetWindowsInformationDWORD (accepted upstream).
* Removed patch to avoid filling KdHelp structure for usermode applications (accepted upstream).
-- Sebastian Lackner <sebastian@fds-team.de> Sun, 25 Jan 2015 05:58:36 +0100

View File

@ -0,0 +1,25 @@
From 0d4bc7ee9451dbd89bec8b76ef0608b78582cf25 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov@etersoft.ru>
Date: Fri, 30 Jan 2015 00:30:45 +0100
Subject: ntoskrnl.exe: Improve KeReleaseMutex stub.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index c90b351..7bc716c 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1356,7 +1356,7 @@ NTSTATUS WINAPI KeWaitForMutexObject(PRKMUTEX Mutex, KWAIT_REASON WaitReason, KP
LONG WINAPI KeReleaseMutex(PRKMUTEX Mutex, BOOLEAN Wait)
{
FIXME( "stub: %p, %d\n", Mutex, Wait );
- return STATUS_NOT_IMPLEMENTED;
+ return STATUS_SUCCESS;
}
--
2.2.2

View File

@ -0,0 +1,26 @@
From 1826c593593f1b66ec4f4704299fdb1485a9b432 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov@etersoft.ru>
Date: Fri, 30 Jan 2015 00:32:38 +0100
Subject: ntoskrnl.exe: Improve KeInitializeSemaphore stub.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 7bc716c..36331a1 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1366,6 +1366,9 @@ LONG WINAPI KeReleaseMutex(PRKMUTEX Mutex, BOOLEAN Wait)
void WINAPI KeInitializeSemaphore( PRKSEMAPHORE Semaphore, LONG Count, LONG Limit )
{
FIXME( "(%p %d %d) stub\n", Semaphore , Count, Limit );
+
+ RtlZeroMemory(Semaphore, sizeof(KSEMAPHORE));
+ Semaphore->Header.Type = 5;
}
--
2.2.2

View File

@ -0,0 +1,26 @@
From 9d314bb031e123beffa43f5b5f47ce6deda25cf4 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov@etersoft.ru>
Date: Fri, 30 Jan 2015 00:33:55 +0100
Subject: ntoskrnl.exe: Improve KeInitializeTimerEx stub.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 36331a1..c3a7e2a 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1387,6 +1387,9 @@ void WINAPI KeInitializeSpinLock( PKSPIN_LOCK SpinLock )
void WINAPI KeInitializeTimerEx( PKTIMER Timer, TIMER_TYPE Type )
{
FIXME( "stub: %p %d\n", Timer, Type );
+
+ RtlZeroMemory(Timer, sizeof(KTIMER));
+ Timer->Header.Type = Type ? 9 : 8;
}
--
2.2.2

View File

@ -2340,6 +2340,9 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then
patch_apply ntoskrnl-Stubs/0004-ntoskrnl.exe-Add-stubs-for-ExAcquireFastMutexUnsafe-.patch
patch_apply ntoskrnl-Stubs/0005-ntoskrnl.exe-Add-stubs-for-ObReferenceObjectByPointe.patch
patch_apply ntoskrnl-Stubs/0006-ntoskrnl.exe-Add-stub-for-KeDelayExecutionThread.patch
patch_apply ntoskrnl-Stubs/0007-ntoskrnl.exe-Improve-KeReleaseMutex-stub.patch
patch_apply ntoskrnl-Stubs/0008-ntoskrnl.exe-Improve-KeInitializeSemaphore-stub.patch
patch_apply ntoskrnl-Stubs/0009-ntoskrnl.exe-Improve-KeInitializeTimerEx-stub.patch
(
echo '+ { "Sebastian Lackner", "include: Remove several duplicate definitions from ntdef.h.", 1 },';
echo '+ { "Austin English", "ntoskrnl.exe: add KeWaitForMultipleObjects stub.", 1 },';
@ -2347,6 +2350,9 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stubs for ExAcquireFastMutexUnsafe and ExReleaseFastMutexUnsafe.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stubs for ObReferenceObjectByPointer and ObDereferenceObject.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Add stub for KeDelayExecutionThread.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeReleaseMutex stub.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeInitializeSemaphore stub.", 1 },';
echo '+ { "Alexander Morozov", "ntoskrnl.exe: Improve KeInitializeTimerEx stub.", 1 },';
) >> "$patchlist"
fi