Added patch to use a helper function for NtWaitForMultipleObjects and NtWaitForSingleObject.

This commit is contained in:
Sebastian Lackner
2015-08-21 07:41:48 +02:00
parent 323b73a1f2
commit ca01e366ef
5 changed files with 81 additions and 1 deletions

View File

@@ -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

View File

@@ -0,0 +1 @@
Fixes: [39127] Use helper function for NtWaitForMultipleObjects and NtWaitForSingleObject