Commit 75c9da68 authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

ntdll: Use helper function for NtWaitForMultipleObjects and NtWaitForSingleObject.

parent c948e841
...@@ -990,12 +990,9 @@ NTSTATUS WINAPI NtSetTimerResolution(IN ULONG resolution, ...@@ -990,12 +990,9 @@ NTSTATUS WINAPI NtSetTimerResolution(IN ULONG resolution,
/* wait operations */ /* wait operations */
/****************************************************************** static NTSTATUS wait_objects( DWORD count, const HANDLE *handles,
* NtWaitForMultipleObjects (NTDLL.@) BOOLEAN wait_any, BOOLEAN alertable,
*/ const LARGE_INTEGER *timeout )
NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles,
BOOLEAN wait_any, BOOLEAN alertable,
const LARGE_INTEGER *timeout )
{ {
select_op_t select_op; select_op_t select_op;
UINT i, flags = SELECT_INTERRUPTIBLE; UINT i, flags = SELECT_INTERRUPTIBLE;
...@@ -1010,11 +1007,22 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles, ...@@ -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.@) * NtWaitForSingleObject (NTDLL.@)
*/ */
NTSTATUS WINAPI NtWaitForSingleObject(HANDLE handle, BOOLEAN alertable, const LARGE_INTEGER *timeout ) 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 );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment