=?UTF-8?Q?Michael=20M=C3=BCller=20?=: ntdll: Use helper function for NtWaitForMultipleObjects and NtWaitForSingleObject.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Aug 24 07:37:15 CDT 2015
Module: wine
Branch: master
Commit: 75c9da68e2b9500ba12cd19d50d29bb989768de9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=75c9da68e2b9500ba12cd19d50d29bb989768de9
Author: Michael Müller <michael at fds-team.de>
Date: Mon Aug 24 08:17:54 2015 +0200
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..6892732 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 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 );
}
More information about the wine-cvs
mailing list