ntdll: Use helper function for NtWaitForMultipleObjects and NtWaitForSingleObject.

This commit is contained in:
Michael Müller 2015-08-24 08:17:54 +02:00 committed by Alexandre Julliard
parent c948e84189
commit 75c9da68e2

View file

@ -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;
@ -1009,12 +1006,23 @@ 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 );
}