From d014e899bcced7388881cc10a878c9e32cfe4299 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 28 Oct 2015 22:54:22 +0100 Subject: [PATCH] Added patch to implement hal.KeQueryPerformanceCounter. --- README.md | 3 +- debian/changelog | 1 + ...-Implement-KeQueryPerformanceCounter.patch | 44 +++++++++++++++++++ .../hal-KeQueryPerformanceCounter/definition | 1 + patches/patchinstall.sh | 19 ++++++++ 5 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 patches/hal-KeQueryPerformanceCounter/0001-hal-Implement-KeQueryPerformanceCounter.patch create mode 100644 patches/hal-KeQueryPerformanceCounter/definition diff --git a/README.md b/README.md index 9d7d505f..1097f228 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,12 @@ Wine. All those differences are also documented on the Included bug fixes and improvements ----------------------------------- -**Bug fixes and features included in the next upcoming release [4]:** +**Bug fixes and features included in the next upcoming release [5]:** * Add implementation for additional HSTRING functions * Do not allow interruption of system APC in server_select ([Wine Bug #14697](https://bugs.winehq.org/show_bug.cgi?id=14697)) * Implement FileNamesInformation class support for NtQueryDirectoryFile +* Implement hal.KeQueryPerformanceCounter ([Wine Bug #39500](https://bugs.winehq.org/show_bug.cgi?id=39500)) * Implement stub for ProcessQuotaLimits info class diff --git a/debian/changelog b/debian/changelog index 80e011ce..c4b1e1f4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ wine-staging (1.7.54) UNRELEASED; urgency=low NtQueryDirectoryFile. * Added patch for implementation of additional HSTRING functions. * Added patches for memory allocation cleanup in gdiplus functions. + * Added patch to implement hal.KeQueryPerformanceCounter. * Removed patch to implement kernel32.GetPhysicallyInstalledSystemMemory (accepted upstream). * Partially removed patches for ws2_32 TransmitFile (accepted upstream). diff --git a/patches/hal-KeQueryPerformanceCounter/0001-hal-Implement-KeQueryPerformanceCounter.patch b/patches/hal-KeQueryPerformanceCounter/0001-hal-Implement-KeQueryPerformanceCounter.patch new file mode 100644 index 00000000..9f4b9645 --- /dev/null +++ b/patches/hal-KeQueryPerformanceCounter/0001-hal-Implement-KeQueryPerformanceCounter.patch @@ -0,0 +1,44 @@ +From 32b4634ca8534cf05469e39991891d9fb0f50f4c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Wed, 28 Oct 2015 22:36:01 +0100 +Subject: hal: Implement KeQueryPerformanceCounter. + +--- + dlls/hal/hal.c | 10 ++++++++++ + dlls/hal/hal.spec | 2 +- + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/dlls/hal/hal.c b/dlls/hal/hal.c +index 96bc895..7baebcd 100644 +--- a/dlls/hal/hal.c ++++ b/dlls/hal/hal.c +@@ -155,3 +155,13 @@ KIRQL WINAPI KeGetCurrentIrql(VOID) + FIXME( " stub!\n"); + return 0; + } ++ ++LARGE_INTEGER WINAPI KeQueryPerformanceCounter(LARGE_INTEGER *frequency) ++{ ++ LARGE_INTEGER counter; ++ ++ TRACE("(%p)\n", frequency); ++ ++ NtQueryPerformanceCounter(&counter, frequency); ++ return counter; ++} +diff --git a/dlls/hal/hal.spec b/dlls/hal/hal.spec +index 3046c65..dc908dd 100644 +--- a/dlls/hal/hal.spec ++++ b/dlls/hal/hal.spec +@@ -72,7 +72,7 @@ + @ stub KeFlushWriteBuffer + @ stdcall KeGetCurrentIrql() + @ stub KeLowerIrql +-@ stub KeQueryPerformanceCounter ++@ stdcall -ret64 KeQueryPerformanceCounter(ptr) + @ stub KeRaiseIrql + @ stub KeRaiseIrqlToDpcLevel + @ stub KeRaiseIrqlToSynchLevel +-- +2.6.1 + diff --git a/patches/hal-KeQueryPerformanceCounter/definition b/patches/hal-KeQueryPerformanceCounter/definition new file mode 100644 index 00000000..d6c0b546 --- /dev/null +++ b/patches/hal-KeQueryPerformanceCounter/definition @@ -0,0 +1 @@ +Fixes: [39500] Implement hal.KeQueryPerformanceCounter diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 0e3e44f7..5a1105e9 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -141,6 +141,7 @@ patch_enable_all () enable_gdi32_MaxPixelFormats="$1" enable_gdi32_MultiMonitor="$1" enable_gdiplus_Memory_Allocation="$1" + enable_hal_KeQueryPerformanceCounter="$1" enable_ieframe_IViewObject_Draw="$1" enable_imagehlp_BindImageEx="$1" enable_imagehlp_Cleanup="$1" @@ -520,6 +521,9 @@ patch_enable () gdiplus-Memory_Allocation) enable_gdiplus_Memory_Allocation="$2" ;; + hal-KeQueryPerformanceCounter) + enable_hal_KeQueryPerformanceCounter="$2" + ;; ieframe-IViewObject-Draw) enable_ieframe_IViewObject_Draw="$2" ;; @@ -3202,6 +3206,21 @@ if test "$enable_gdiplus_Memory_Allocation" -eq 1; then ) >> "$patchlist" fi +# Patchset hal-KeQueryPerformanceCounter +# | +# | This patchset fixes the following Wine bugs: +# | * [#39500] Implement hal.KeQueryPerformanceCounter +# | +# | Modified files: +# | * dlls/hal/hal.c, dlls/hal/hal.spec +# | +if test "$enable_hal_KeQueryPerformanceCounter" -eq 1; then + patch_apply hal-KeQueryPerformanceCounter/0001-hal-Implement-KeQueryPerformanceCounter.patch + ( + echo '+ { "Michael Müller", "hal: Implement KeQueryPerformanceCounter.", 1 },'; + ) >> "$patchlist" +fi + # Patchset ieframe-IViewObject-Draw # | # | This patchset fixes the following Wine bugs: