kernel32: Forward condition variable functions to ntdll.

This commit is contained in:
Sebastian Lackner 2014-01-05 03:53:12 +01:00 committed by Alexandre Julliard
parent 5472b9f9ca
commit ddc7f300e2
3 changed files with 24 additions and 4 deletions

View File

@ -750,6 +750,7 @@
@ stdcall InitOnceComplete(ptr long ptr)
@ stdcall InitOnceExecuteOnce(ptr ptr ptr ptr)
@ stdcall InitOnceInitialize(ptr) ntdll.RtlRunOnceInitialize
@ stdcall InitializeConditionVariable(ptr) ntdll.RtlInitializeConditionVariable
@ stdcall InitializeCriticalSection(ptr)
@ stdcall InitializeCriticalSectionAndSpinCount(ptr long)
@ stdcall InitializeCriticalSectionEx(ptr long long)
@ -1194,6 +1195,7 @@
@ stdcall SignalObjectAndWait(long long long long)
@ stdcall SizeofResource(long long)
@ stdcall Sleep(long)
@ stdcall SleepConditionVariableCS(ptr ptr long)
@ stdcall SleepEx(long long)
@ stdcall SuspendThread(long)
@ stdcall SwitchToFiber(ptr)
@ -1263,6 +1265,8 @@
@ stdcall WaitForSingleObjectEx(long long long)
@ stdcall WaitNamedPipeA (str long)
@ stdcall WaitNamedPipeW (wstr long)
@ stdcall WakeAllConditionVariable(ptr) ntdll.RtlWakeAllConditionVariable
@ stdcall WakeConditionVariable(ptr) ntdll.RtlWakeConditionVariable
@ stdcall WerRegisterFile(wstr long long)
@ stdcall WerRegisterMemoryBlock(ptr long)
@ stdcall WerRegisterRuntimeExceptionModule(wstr ptr)

View File

@ -2321,3 +2321,21 @@ __ASM_STDCALL_FUNC(InterlockedDecrement, 4,
"ret $4")
#endif /* __i386__ */
/***********************************************************************
* SleepConditionVariableCS (KERNEL32.@)
*/
BOOL WINAPI SleepConditionVariableCS( CONDITION_VARIABLE *variable, CRITICAL_SECTION *crit, DWORD timeout )
{
NTSTATUS status;
LARGE_INTEGER time;
status = RtlSleepConditionVariableCS( variable, crit, get_nt_timeout( &time, timeout ) );
if (status != STATUS_SUCCESS)
{
SetLastError( RtlNtStatusToDosError(status) );
return FALSE;
}
return TRUE;
}

View File

@ -1477,8 +1477,7 @@ static void test_condvars_consumer_producer(void)
if (!pInitializeConditionVariable) {
/* function is not yet in XP, only in newer Windows */
/* and not yet implemented in Wine for some days/weeks */
todo_wine win_skip("no condition variable support.\n");
win_skip("no condition variable support.\n");
return;
}
@ -1640,8 +1639,7 @@ static void test_condvars_base(void) {
if (!pInitializeConditionVariable) {
/* function is not yet in XP, only in newer Windows */
/* and not yet implemented in Wine for some days/weeks */
todo_wine win_skip("no condition variable support.\n");
win_skip("no condition variable support.\n");
return;
}