You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Added patch to use a helper function for NtWaitForMultipleObjects and NtWaitForSingleObject.
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
From d9ce312996674d62b417615d50b9fd035063240b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 21 Aug 2015 06:33:49 +0200
|
||||
Subject: ntdll: Use helper function for NtWaitForMultipleObjects and
|
||||
NtWaitForSingleObject.
|
||||
|
||||
---
|
||||
dlls/ntdll/sync.c | 22 +++++++++++++++-------
|
||||
1 file changed, 15 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
|
||||
index b0329ab..9773382 100644
|
||||
--- a/dlls/ntdll/sync.c
|
||||
+++ b/dlls/ntdll/sync.c
|
||||
@@ -990,12 +990,9 @@ NTSTATUS WINAPI NtSetTimerResolution(IN ULONG resolution,
|
||||
|
||||
/* wait operations */
|
||||
|
||||
-/******************************************************************
|
||||
- * NtWaitForMultipleObjects (NTDLL.@)
|
||||
- */
|
||||
-NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles,
|
||||
- BOOLEAN wait_any, BOOLEAN alertable,
|
||||
- const LARGE_INTEGER *timeout )
|
||||
+static inline NTSTATUS wait_objects( DWORD count, const HANDLE *handles,
|
||||
+ BOOLEAN wait_any, BOOLEAN alertable,
|
||||
+ const LARGE_INTEGER *timeout )
|
||||
{
|
||||
select_op_t select_op;
|
||||
UINT i, flags = SELECT_INTERRUPTIBLE;
|
||||
@@ -1010,11 +1007,22 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles,
|
||||
|
||||
|
||||
/******************************************************************
|
||||
+ * NtWaitForMultipleObjects (NTDLL.@)
|
||||
+ */
|
||||
+NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles,
|
||||
+ BOOLEAN wait_any, BOOLEAN alertable,
|
||||
+ const LARGE_INTEGER *timeout )
|
||||
+{
|
||||
+ return wait_objects( count, handles, wait_any, alertable, timeout );
|
||||
+}
|
||||
+
|
||||
+
|
||||
+/******************************************************************
|
||||
* NtWaitForSingleObject (NTDLL.@)
|
||||
*/
|
||||
NTSTATUS WINAPI NtWaitForSingleObject(HANDLE handle, BOOLEAN alertable, const LARGE_INTEGER *timeout )
|
||||
{
|
||||
- return NtWaitForMultipleObjects( 1, &handle, FALSE, alertable, timeout );
|
||||
+ return wait_objects( 1, &handle, FALSE, alertable, timeout );
|
||||
}
|
||||
|
||||
|
||||
--
|
||||
2.5.0
|
||||
|
1
patches/ntdll-NtWaitForMultipleObjects/definition
Normal file
1
patches/ntdll-NtWaitForMultipleObjects/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [39127] Use helper function for NtWaitForMultipleObjects and NtWaitForSingleObject
|
@@ -178,6 +178,7 @@ patch_enable_all ()
|
||||
enable_ntdll_NtQueryEaFile="$1"
|
||||
enable_ntdll_NtQuerySection="$1"
|
||||
enable_ntdll_NtSetLdtEntries="$1"
|
||||
enable_ntdll_NtWaitForMultipleObjects="$1"
|
||||
enable_ntdll_Pipe_SpecialCharacters="$1"
|
||||
enable_ntdll_RtlIpStringToAddress="$1"
|
||||
enable_ntdll_SystemRoot_Symlink="$1"
|
||||
@@ -619,6 +620,9 @@ patch_enable ()
|
||||
ntdll-NtSetLdtEntries)
|
||||
enable_ntdll_NtSetLdtEntries="$2"
|
||||
;;
|
||||
ntdll-NtWaitForMultipleObjects)
|
||||
enable_ntdll_NtWaitForMultipleObjects="$2"
|
||||
;;
|
||||
ntdll-Pipe_SpecialCharacters)
|
||||
enable_ntdll_Pipe_SpecialCharacters="$2"
|
||||
;;
|
||||
@@ -3856,6 +3860,21 @@ if test "$enable_ntdll_NtSetLdtEntries" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-NtWaitForMultipleObjects
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#39127] Use helper function for NtWaitForMultipleObjects and NtWaitForSingleObject
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ntdll/sync.c
|
||||
# |
|
||||
if test "$enable_ntdll_NtWaitForMultipleObjects" -eq 1; then
|
||||
patch_apply ntdll-NtWaitForMultipleObjects/0001-ntdll-Use-helper-function-for-NtWaitForMultipleObjec.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "ntdll: Use helper function for NtWaitForMultipleObjects and NtWaitForSingleObject.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-Pipe_SpecialCharacters
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
Reference in New Issue
Block a user