mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 16:12:02 +00:00
[KERNEL32_WINETEST] Enable ConditionVariable and SRW lock tests
If we cannot find the functions in kernel32, try to get them from kernel32_vista. This will allow testing our own implementation, while still failing in W2K3 (no implementation available).
This commit is contained in:
parent
9d1ee2400a
commit
d69a00e039
1 changed files with 25 additions and 0 deletions
|
@ -2644,6 +2644,9 @@ START_TEST(sync)
|
||||||
int argc;
|
int argc;
|
||||||
HMODULE hdll = GetModuleHandleA("kernel32.dll");
|
HMODULE hdll = GetModuleHandleA("kernel32.dll");
|
||||||
HMODULE hntdll = GetModuleHandleA("ntdll.dll");
|
HMODULE hntdll = GetModuleHandleA("ntdll.dll");
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
HMODULE hdll_vista = GetModuleHandleA("kernel32_vista.dll");
|
||||||
|
#endif
|
||||||
|
|
||||||
pInitOnceInitialize = (void *)GetProcAddress(hdll, "InitOnceInitialize");
|
pInitOnceInitialize = (void *)GetProcAddress(hdll, "InitOnceInitialize");
|
||||||
pInitOnceExecuteOnce = (void *)GetProcAddress(hdll, "InitOnceExecuteOnce");
|
pInitOnceExecuteOnce = (void *)GetProcAddress(hdll, "InitOnceExecuteOnce");
|
||||||
|
@ -2668,6 +2671,28 @@ START_TEST(sync)
|
||||||
pRtlInterlockedPushListSList = (void *)GetProcAddress(hntdll, "RtlInterlockedPushListSList");
|
pRtlInterlockedPushListSList = (void *)GetProcAddress(hntdll, "RtlInterlockedPushListSList");
|
||||||
pRtlInterlockedPushListSListEx = (void *)GetProcAddress(hntdll, "RtlInterlockedPushListSListEx");
|
pRtlInterlockedPushListSListEx = (void *)GetProcAddress(hntdll, "RtlInterlockedPushListSListEx");
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
if (!pInitializeConditionVariable)
|
||||||
|
{
|
||||||
|
pInitializeConditionVariable = (void *)GetProcAddress(hdll_vista, "InitializeConditionVariable");
|
||||||
|
pSleepConditionVariableCS = (void *)GetProcAddress(hdll_vista, "SleepConditionVariableCS");
|
||||||
|
pSleepConditionVariableSRW = (void *)GetProcAddress(hdll_vista, "SleepConditionVariableSRW");
|
||||||
|
pWakeAllConditionVariable = (void *)GetProcAddress(hdll_vista, "WakeAllConditionVariable");
|
||||||
|
pWakeConditionVariable = (void *)GetProcAddress(hdll_vista, "WakeConditionVariable");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pInitializeSRWLock)
|
||||||
|
{
|
||||||
|
pInitializeSRWLock = (void *)GetProcAddress(hdll_vista, "InitializeSRWLock");
|
||||||
|
pAcquireSRWLockExclusive = (void *)GetProcAddress(hdll_vista, "AcquireSRWLockExclusive");
|
||||||
|
pAcquireSRWLockShared = (void *)GetProcAddress(hdll_vista, "AcquireSRWLockShared");
|
||||||
|
pReleaseSRWLockExclusive = (void *)GetProcAddress(hdll_vista, "ReleaseSRWLockExclusive");
|
||||||
|
pReleaseSRWLockShared = (void *)GetProcAddress(hdll_vista, "ReleaseSRWLockShared");
|
||||||
|
pTryAcquireSRWLockExclusive = (void *)GetProcAddress(hdll_vista, "TryAcquireSRWLockExclusive");
|
||||||
|
pTryAcquireSRWLockShared = (void *)GetProcAddress(hdll_vista, "TryAcquireSRWLockShared");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
argc = winetest_get_mainargs( &argv );
|
argc = winetest_get_mainargs( &argv );
|
||||||
if (argc >= 3)
|
if (argc >= 3)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue