26#define WIN32_NO_STATUS
35#define __fastcall __stdcall
37static HANDLE (
WINAPI *pCreateMemoryResourceNotification)(MEMORY_RESOURCE_NOTIFICATION_TYPE);
45static VOID (
WINAPI *pInitializeConditionVariable)(PCONDITION_VARIABLE);
48static VOID (
WINAPI *pWakeAllConditionVariable)(PCONDITION_VARIABLE);
49static VOID (
WINAPI *pWakeConditionVariable)(PCONDITION_VARIABLE);
83static void * (
WINAPI *call_fastcall_func4)(
void *
func,
const void *
a,
const void *
b,
const void *
c,
const void *
d);
88 thunk->pop_edx = 0x5a;
89 thunk->pop_eax = 0x58;
90 thunk->pop_ecx = 0x59;
91 thunk->xchg[0] = 0x87;
92 thunk->xchg[1] = 0x14;
93 thunk->xchg[2] = 0x24;
94 thunk->jmp_eax = 0xe0ff;
95 call_fastcall_func4 = (
void *)thunk;
98#define call_func4(func, a, b, c, d) call_fastcall_func4(func, (const void *)(a), \
99 (const void *)(b), (const void *)(c), (const void *)(d))
103#define init_fastcall_thunk() do { } while(0)
104#define call_func4(func, a, b, c, d) func(a, b, c, d)
121 ok(
event[0] &&
event[1],
"failed to create event flags\n");
136 for (
i = 0;
i < 10000;
i++)
172 ok(
r ==
TRUE,
"should succeed\n");
197 ok(!
handle,
"OpenMutex succeeded\n");
207 ok(!
handle,
"OpenSemaphore succeeded\n");
217 ok(!
handle,
"OpenEvent succeeded\n");
227 ok(!
handle,
"OpenWaitableTimer succeeded\n");
242 ok(hOpened ==
NULL,
"OpenMutex succeeded\n");
252 ok(hOpened ==
NULL,
"OpenMutex succeeded\n");
263 for(
i=0;
i < 31;
i++)
266 ok(wait_ret ==
WAIT_OBJECT_0,
"WaitForSingleObject failed with error 0x%08lx\n", wait_ret);
273 ok(wait_ret ==
WAIT_FAILED,
"WaitForSingleObject succeeded\n");
276 for (
i = 0;
i < 32;
i++)
299 ok( failed == 0x0de0fffe,
"open succeeded when it shouldn't: %lx\n", failed);
304 "ReleaseMutex should have failed with ERROR_NOT_OWNER instead of %ld\n",
GetLastError());
310 ok(!hOpened,
"OpenMutex succeeded\n");
315 ok(!hOpened,
"OpenMutex succeeded\n");
320 ok(!hOpened,
"OpenMutex succeeded\n");
325 ok(!hOpened,
"OpenMutex succeeded\n");
359 memset(&slist_header, 0xff,
sizeof(slist_header));
362 ok(
size == 0,
"Expected size == 0, got %u\n",
size);
368 ok(
size == 1,
"Expected size == 1, got %u\n",
size);
373 ok(
item->value == 1,
"Expected item->value == 1, got %u\n",
item->value);
375 ok(
size == 2,
"Expected size == 2, got %u\n",
size);
380 ok(
item->value == 2,
"Expected item->value == 2, got %u\n",
item->value);
382 ok(
size == 3,
"Expected size == 3, got %u\n",
size);
387 ok(
item->value == 3,
"Expected item->value == 3, got %u\n",
item->value);
389 ok(
size == 2,
"Expected size == 2, got %u\n",
size);
394 ok(
item->value == 2,
"Expected item->value == 2, got %u\n",
item->value);
396 ok(
item->value == 1,
"Expected item->value == 1, got %u\n",
item->value);
398 ok(
size == 0,
"Expected size == 0, got %u\n",
size);
408 ok(
item->value == 3,
"Expected item->value == 3, got %u\n",
item->value);
410 ok(
size == 43,
"Expected size == 43, got %u\n",
size);
415 ok(
item->value == 2,
"Expected item->value == 2, got %u\n",
item->value);
417 ok(
size == 42,
"Expected size == 42, got %u\n",
size);
422 ok(
item->value == 1,
"Expected item->value == 1, got %u\n",
item->value);
424 ok(
size == 41,
"Expected size == 41, got %u\n",
size);
429 ok(
item->value == 3,
"Expected item->value == 3, got %u\n",
item->value);
431 ok(
size == 40,
"Expected size == 40, got %u\n",
size);
436 ok(
size == 40,
"Expected size == 40, got %u\n",
size);
448 ok(
item->value == 1,
"Expected item->value == 1, got %u\n",
item->value);
450 ok(
size == 0,
"Expected size == 0, got %u\n",
size);
453 if (pRtlInterlockedPushListSListEx)
457 entry = pRtlInterlockedPushListSListEx(&slist_header, &
item2.entry, &
item1.entry, 42);
460 ok(
item->value == 3,
"Expected item->value == 3, got %u\n",
item->value);
462 ok(
size == 43,
"Expected size == 43, got %u\n",
size);
467 ok(
item->value == 2,
"Expected item->value == 2, got %u\n",
item->value);
469 ok(
item->value == 1,
"Expected item->value == 1, got %u\n",
item->value);
471 ok(
item->value == 3,
"Expected item->value == 3, got %u\n",
item->value);
473 ok(
size == 0,
"Expected size == 0, got %u\n",
size);
476 win_skip(
"RtlInterlockedPushListSListEx not available, skipping tests\n");
479 for (
i = 0;
i < 65536;
i++)
488 ok(
item->value ==
i,
"Expected item->value == %u, got %u\n",
i,
item->value);
495 ok(
size == ((
i + 1) & 0xffff),
"Expected size == %u, got %u\n", (
i + 1) & 0xffff,
size);
499 for (
i = 65536;
i > 0;
i--)
503 ok(
item->value ==
i,
"Expected item->value == %u, got %u\n",
i,
item->value);
509 ok(
size == 0,
"Expected size == 0, got %u\n",
size);
524#if defined(__REACTOS__) && defined(_MSC_VER)
532 sa.nLength =
sizeof(
sa);
533 sa.lpSecurityDescriptor = &
sd;
539#if defined(__REACTOS__) && defined(_MSC_VER)
549#if defined(__REACTOS__) && defined(_MSC_VER)
560#if defined(__REACTOS__) && defined(_MSC_VER)
571#if defined(__REACTOS__) && defined(_MSC_VER)
580#if defined(__REACTOS__) && defined(_MSC_VER)
590#if defined(__REACTOS__) && defined(_MSC_VER)
600#if defined(__REACTOS__) && defined(_MSC_VER)
609#if defined(__REACTOS__) && defined(_MSC_VER)
614 ok( !handle2,
"OpenEvent succeeded\n");
619 ok( !handle2,
"OpenEvent succeeded\n");
624 ok( !handle2,
"OpenEvent succeeded\n");
631 if (!pCreateMemoryResourceNotification || !pQueryMemoryResourceNotification)
633 trace(
"memory resource notifications not supported\n" );
636 handle = pCreateMemoryResourceNotification( HighMemoryResourceNotification + 1 );
637 ok( !
handle,
"CreateMemoryResourceNotification succeeded\n" );
640 ok( !
ret,
"QueryMemoryResourceNotification succeeded\n" );
643 handle = pCreateMemoryResourceNotification( LowMemoryResourceNotification );
655#if defined(__REACTOS__) && defined(_MSC_VER)
674#if defined(__REACTOS__) && defined(_MSC_VER)
683#if defined(__REACTOS__) && defined(_MSC_VER)
693#if defined(__REACTOS__) && defined(_MSC_VER)
703#if defined(__REACTOS__) && defined(_MSC_VER)
712#if defined(__REACTOS__) && defined(_MSC_VER)
717 ok( !handle2,
"OpenSemaphore succeeded\n");
722 ok( !handle2,
"OpenSemaphore succeeded\n");
727 ok( !handle2,
"OpenSemaphore succeeded\n");
740#if defined(__REACTOS__) && defined(_MSC_VER)
749#if defined(__REACTOS__) && defined(_MSC_VER)
759#if defined(__REACTOS__) && defined(_MSC_VER)
769#if defined(__REACTOS__) && defined(_MSC_VER)
778#if defined(__REACTOS__) && defined(_MSC_VER)
783 ok( !handle2,
"OpenWaitableTimer succeeded\n");
788 ok( !handle2,
"OpenWaitableTimer failed with error %ld\n",
GetLastError());
793 ok( !handle2,
"OpenWaitableTimer failed with error %ld\n",
GetLastError());
814 static const char prefix[] =
"pfx";
818 const char *
buffer =
"12345678123456781234567812345678";
822 if(!p_BindIoCompletionCallback) {
823 win_skip(
"BindIoCompletionCallback not found in this DLL\n");
842 ok(retb ==
FALSE,
"BindIoCompletionCallback succeeded on a file that wasn't created with FILE_FLAG_OVERLAPPED\n");
855 ok(retb ==
TRUE,
"BindIoCompletionCallback failed\n");
866 ok(retb ==
FALSE,
"BindIoCompletionCallback succeeded when setting the same callback on the file again\n");
868 retb = p_BindIoCompletionCallback(
hFile,
NULL, 0);
869 ok(retb ==
FALSE,
"BindIoCompletionCallback succeeded when setting the callback to NULL\n");
885 "Expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
887 ok(retb ==
TRUE,
"BindIoCompletionCallback failed with Flags != 0\n");
894 ok(retb ==
FALSE,
"BindIoCompletionCallback succeeded on a NULL file\n");
903 ok(timedOut,
"Timer callbacks should always time out\n");
917 ok(timedOut,
"Timer callbacks should always time out\n");
918 if (
d->t && ++
d->num_calls ==
d->max_calls)
925 ok(!
ret,
"DeleteTimerQueueTimer\n");
933 ok(timedOut,
"Timer callbacks should always time out\n");
934 if (
d->t && ++
d->num_calls ==
d->max_calls)
939 ok(
ret,
"ChangeTimerQueueTimer\n");
946 ok(timedOut,
"Timer callbacks should always time out\n");
955 ok(
ret,
"ChangeTimerQueueTimer\n");
963 ok(timedOut,
"Timer callbacks should always time out\n");
971 ok(timedOut,
"Timer callbacks should always time out\n");
974 if (
d->q &&
d->num_calls++ == 0)
987 ok(!
ret,
"DeleteTimerQueueTimer\n");
991 ok(
ret,
"CreateTimerQueueTimer\n");
992 ok(
t !=
NULL,
"CreateTimerQueueTimer\n");
995 ok(
ret,
"DeleteTimerQueueTimer\n");
1004 HANDLE q, t0, t1, t2, t3, t4, t5;
1012 ok(
q !=
NULL,
"CreateTimerQueue\n");
1017 "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %ld\n",
1022 ok(
q !=
NULL,
"CreateTimerQueue\n");
1028 ok(
ret,
"CreateTimerQueueTimer\n");
1029 ok(t0 !=
NULL,
"CreateTimerQueueTimer\n");
1033 "DeleteTimerQueueTimer ret=%d le=%lu\n", ret0,
GetLastError());
1039 ok(
ret,
"CreateTimerQueueTimer\n");
1040 ok(t1 !=
NULL,
"CreateTimerQueueTimer\n");
1046 ok(
ret,
"CreateTimerQueueTimer\n");
1047 ok(t2 !=
NULL,
"CreateTimerQueueTimer\n");
1053 ok(
ret,
"CreateTimerQueueTimer\n");
1054 ok(t3 !=
NULL,
"CreateTimerQueueTimer\n");
1060 ok(
ret,
"CreateTimerQueueTimer\n");
1061 ok(t4 !=
NULL,
"CreateTimerQueueTimer\n");
1067 ok(
ret,
"CreateTimerQueueTimer\n");
1068 ok(t5 !=
NULL,
"CreateTimerQueueTimer\n");
1075 ok(
ret,
"DeleteTimerQueueTimer\n");
1079 ok(
ret,
"DeleteTimerQueueTimer\n");
1082 ok(
ret,
"DeleteTimerQueueEx\n");
1084 ok(n0 == 1 ||
broken(ret0 && n0 == 0),
"Timer callback 0 expected 1 got %d\n", n0);
1085 ok(
n1 == 1,
"Timer callback 1 expected 1 got %d\n",
n1);
1086 ok(
n2 <
n3,
"Timer callback 2 & 3 expected %d < %d\n",
n2,
n3);
1087 ok(
n4 == 0,
"Timer callback 4 expected 0 got %d\n",
n4);
1088 ok(
n5 == 1,
"Timer callback 5 expected 1 got %d\n",
n5);
1094 if (!
e || !et1 || !et2)
1096 skip(
"Failed to create timer queue descruction event\n");
1101 ok(
q !=
NULL,
"CreateTimerQueue\n");
1106 ok(
ret,
"CreateTimerQueueTimer\n");
1107 ok(t1 !=
NULL,
"CreateTimerQueueTimer\n");
1112 ok(
ret,
"CreateTimerQueueTimer\n");
1113 ok(t2 !=
NULL,
"CreateTimerQueueTimer\n");
1118 ok(
ret,
"CreateTimerQueueTimer\n");
1119 ok(t3 !=
NULL,
"CreateTimerQueueTimer\n");
1124 ok(
ret,
"CreateTimerQueueTimer\n");
1125 ok(t4 !=
NULL,
"CreateTimerQueueTimer\n");
1135 "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %ld\n",
1140 ok(!
ret,
"DeleteTimerQueueTimer call was expected to fail\n");
1142 "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %ld\n",
1147 ok(
ret,
"DeleteTimerQueueTimer call was expected to fail\n");
1149 "DeleteTimerQueueTimer, GetLastError: expected 0xdeadbeef, got %ld\n",
1152 "Timer destruction event not triggered\n");
1156 ok(!
ret,
"DeleteTimerQueueTimer call was expected to fail\n");
1158 "DeleteTimerQueueTimer, GetLastError: expected ERROR_IO_PENDING, got %ld\n",
1161 "Timer destruction event not triggered\n");
1166 "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %ld\n",
1169 "Queue destruction event not triggered\n");
1174 ok(
q !=
NULL,
"CreateTimerQueue\n");
1180 ok(
ret,
"CreateTimerQueueTimer\n");
1181 ok(t1 !=
NULL,
"CreateTimerQueueTimer\n");
1183 ok(
ret,
"ChangeTimerQueueTimer\n");
1191 ok(
ret,
"CreateTimerQueueTimer\n");
1192 ok(t2 !=
NULL,
"CreateTimerQueueTimer\n");
1200 ok(
ret,
"CreateTimerQueueTimer\n");
1201 ok(t3 !=
NULL,
"CreateTimerQueueTimer\n");
1208 ok(
ret,
"CreateTimerQueueTimer\n");
1209 ok(t4 !=
NULL,
"CreateTimerQueueTimer\n");
1214 ok(
ret,
"DeleteTimerQueueEx\n");
1215 ok(
n1 == 1,
"ChangeTimerQueueTimer\n");
1218 ok(d4.
num_calls == 1,
"Timer flagged for deletion incorrectly\n");
1222 ok(
q !=
NULL,
"CreateTimerQueue\n");
1230 ok(
ret,
"CreateTimerQueueTimer\n");
1231 ok(t1 !=
NULL,
"CreateTimerQueueTimer\n");
1238 "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %ld\n",
1246 ok(
ret,
"CreateTimerQueueTimer, default queue\n");
1247 ok(t1 !=
NULL,
"CreateTimerQueueTimer, default queue\n");
1250 ok(
ret,
"ChangeTimerQueueTimer, default queue\n");
1253 ok(
ret,
"DeleteTimerQueueTimer, default queue\n");
1257 ok(
q !=
NULL,
"CreateTimerQueue\n");
1262 ok(
ret,
"CreateTimerQueueTimer\n");
1263 ok(t1 !=
NULL,
"CreateTimerQueueTimer\n");
1268 ok(
ret,
"CreateTimerQueueTimer\n");
1269 ok(t2 !=
NULL,
"CreateTimerQueueTimer\n");
1272 ok(
ret,
"ChangeTimerQueueTimer\n");
1275 ok(
ret,
"ChangeTimerQueueTimer\n");
1278 ok(
ret,
"DeleteTimerQueueTimer\n");
1281 ok(
ret,
"DeleteTimerQueueTimer\n");
1286 ok(!
ret,
"DeleteTimerQueueEx call was expected to fail\n");
1288 "DeleteTimerQueueEx, GetLastError: expected ERROR_INVALID_HANDLE, got %ld\n",
1294 "DeleteTimerQueueEx, GetLastError: expected ERROR_IO_PENDING, got %ld\n",
1307 HANDLE signaled, nonsignaled, invalid;
1314 invalid = (
HANDLE) 0xdeadbee0;
1411 ok( maxevents[
i] != 0,
"should create enough events\n");
1433#if defined(__REACTOS__) && defined(_WIN64)
1439#if defined(__REACTOS__) && defined(_WIN64)
1449#if defined(__REACTOS__) && defined(_WIN64)
1465#if defined(__REACTOS__) && defined(_WIN64)
1470 "expected ERROR_INVALID_HANDLE, got %lu\n",
GetLastError());
1476#if defined(__REACTOS__) && defined(_WIN64)
1481 "expected ERROR_INVALID_HANDLE, got %lu\n",
GetLastError());
1486#if defined(__REACTOS__) && defined(_WIN64)
1495#if defined(__REACTOS__) && defined(_WIN64)
1510 ok(initonce->Ptr == (
void*)0x1,
"got %p\n", initonce->Ptr);
1511 ok(parameter == (
void*)0xdeadbeef,
"got wrong parameter\n");
1520 if (!pInitOnceInitialize || !pInitOnceExecuteOnce)
1522 win_skip(
"one-time initialization API not supported\n");
1527 initonce.Ptr = (
void*)0xdeadbeef;
1528 pInitOnceInitialize(&initonce);
1529 ok(initonce.Ptr ==
NULL,
"got %p\n", initonce.Ptr);
1536 ok(initonce.Ptr == (
void*)0x2,
"got %p\n", initonce.Ptr);
1545 ok(initonce.Ptr == (
void*)0x2,
"got %p\n", initonce.Ptr);
1549 pInitOnceInitialize(&initonce);
1555 ok(initonce.Ptr == (
void*)0xFFFFFFF2,
"got %p\n", initonce.Ptr);
1563 pInitOnceInitialize(&initonce);
1567 ok(initonce.Ptr ==
NULL,
"got %p\n", initonce.Ptr);
1572 pInitOnceInitialize(&initonce);
1575 ret = pInitOnceBeginInitialize(&initonce, 0, &pending, &
g_initctxt);
1577 ok(pending,
"got %d\n", pending);
1578 ok(initonce.Ptr == (
void*)1,
"got %p\n", initonce.Ptr);
1587 ok(pending == 0xf,
"got %d\n", pending);
1588 ok(initonce.Ptr == (
void*)1,
"got %p\n", initonce.Ptr);
1595 ok(initonce.Ptr == (
void*)1,
"got %p\n", initonce.Ptr);
1601 ok(initonce.Ptr == (
void*)0xdeadbee2,
"got %p\n", initonce.Ptr);
1603 pInitOnceInitialize(&initonce);
1607 ok(initonce.Ptr ==
NULL,
"got %p\n", initonce.Ptr);
1612 ok(initonce.Ptr ==
NULL,
"got %p\n", initonce.Ptr);
1614 ret = pInitOnceBeginInitialize(&initonce, 0, &pending, &
g_initctxt);
1616 ok(pending,
"got %d\n", pending);
1617 ok(initonce.Ptr == (
void*)1,
"got %p\n", initonce.Ptr);
1626 ok(initonce.Ptr == (
void*)1,
"got %p\n", initonce.Ptr);
1629 ret = pInitOnceComplete(&initonce, 0, (
void *)0xdeadbeef);
1631 ok(initonce.Ptr == (
void*)1,
"got %p\n", initonce.Ptr);
1635 ok(initonce.Ptr ==
NULL,
"got %p\n", initonce.Ptr);
1637 pInitOnceInitialize(&initonce);
1640 ok(pending,
"got %d\n", pending);
1641 ok(initonce.Ptr == (
void*)3,
"got %p\n", initonce.Ptr);
1644 ret = pInitOnceBeginInitialize(&initonce, 0, &pending, &
g_initctxt);
1649 ok(pending,
"got %d\n", pending);
1650 ok(initonce.Ptr == (
void*)3,
"got %p\n", initonce.Ptr);
1655 ok(initonce.Ptr == (
void*)3,
"got %p\n", initonce.Ptr);
1660 ok(initonce.Ptr == (
void*)3,
"got %p\n", initonce.Ptr);
1665 ok(initonce.Ptr == (
void*)3,
"got %p\n", initonce.Ptr);
1669 ok(initonce.Ptr == (
void*)0xdeadbee2,
"got %p\n", initonce.Ptr);
1674 ok(initonce.Ptr == (
void*)0xdeadbee2,
"got %p\n", initonce.Ptr);
1676 pInitOnceInitialize(&initonce);
1677 ret = pInitOnceBeginInitialize(&initonce, 0, &pending, &
g_initctxt);
1679 ok(pending,
"got %d\n", pending);
1680 ok(initonce.Ptr == (
void*)1,
"got %p\n", initonce.Ptr);
1684 pInitOnceInitialize(&initonce);
1692 ret = pInitOnceBeginInitialize(&initonce, 0, &pending, &
g_initctxt);
1694 ok(pending,
"got %d\n", pending);
1695 ok(initonce.Ptr == (
void*)1,
"got %p\n", initonce.Ptr);
1704 ret = pInitOnceComplete(&initonce, 0, (
void *)0xdeadbee0);
1706 ok(initonce.Ptr == (
void*)0xdeadbee2,
"got %p\n", initonce.Ptr);
1710 ok(!pending,
"got %d\n", pending);
1711 ok(initonce.Ptr == (
void*)0xdeadbee2,
"got %p\n", initonce.Ptr);
1712 ok(
g_initctxt == (
void*)0xdeadbee0,
"got %p\n", initonce.Ptr);
1718 pInitOnceInitialize(&initonce);
1721 ok(pending,
"got %d\n", pending);
1722 ok(initonce.Ptr == (
void*)3,
"got %p\n", initonce.Ptr);
1733 ok(initonce.Ptr == (
void*)0xdeadbee2,
"got %p\n", initonce.Ptr);
1737 ok(!pending,
"got %d\n", pending);
1738 ok(initonce.Ptr == (
void*)0xdeadbee2,
"got %p\n", initonce.Ptr);
1739 ok(
g_initctxt == (
void*)0xdeadbee0,
"got %p\n", initonce.Ptr);
1753#define BUFFER_SIZE 5
1756 DWORD sleepinterval = 5;
1759 Sleep(sleepinterval);
1760 if (sleepinterval > 1)
1785 DWORD sleepinterval = 1;
1805 Sleep(sleepinterval);
1806 if (sleepinterval < 5) sleepinterval += 1;
1813 HANDLE hp1,hp2,hp3,hc1,hc2,hc3;
1815 DWORD cnt1,cnt2,cnt3;
1817 if (!pInitializeConditionVariable) {
1819 win_skip(
"no condition variable support.\n");
1883#include "pshpack1.h"
1912 CONDITION_VARIABLE *
cv =
arg;
1916 pWakeConditionVariable(
cv);
1920 pWakeAllConditionVariable(
cv);
1925 pWakeConditionVariable(
cv);
1929 pWakeAllConditionVariable(
cv);
1934 pWakeConditionVariable(
cv);
1939 if (!pInitializeSRWLock)
1944 pWakeConditionVariable(
cv);
1949 pWakeConditionVariable(
cv);
1954 pWakeConditionVariable(
cv);
1960 pWakeConditionVariable(
cv);
1968 CONDITION_VARIABLE *
cv =
arg;
1977 ok (!
ret,
"SleepConditionVariableCS should return FALSE on out of band wake\n");
1987 ok (!
ret,
"SleepConditionVariableCS should return FALSE on out of band wake\n");
1994 ok (
ret,
"SleepConditionVariableCS should return TRUE on good wake\n");
2000 ok (
ret,
"SleepConditionVariableCS should return TRUE on good wakeall\n");
2006 ok (!
ret,
"SleepConditionVariableCS should return FALSE on out of band wake\n");
2013 ok (
ret,
"SleepConditionVariableCS should still return TRUE on crit unlock delay\n");
2016 if (!pInitializeSRWLock)
2018 win_skip(
"no srw lock support.\n");
2027 ok (
ret,
"pSleepConditionVariableSRW should return TRUE on good wake\n");
2031 ret = pSleepConditionVariableSRW(
cv, &
condvar_srwlock, 200, CONDITION_VARIABLE_LOCKMODE_SHARED);
2033 ok (
ret,
"pSleepConditionVariableSRW should return TRUE on good wake\n");
2039 ok (
ret,
"pSleepConditionVariableSRW should return TRUE on good wake\n");
2043 ret = pSleepConditionVariableSRW(
cv, &
condvar_srwlock, 200, CONDITION_VARIABLE_LOCKMODE_SHARED);
2045 ok (
ret,
"pSleepConditionVariableSRW should return TRUE on good wake\n");
2057 if (!pInitializeConditionVariable) {
2059 win_skip(
"no condition variable support.\n");
2065 if (pInitializeSRWLock)
2072 ok (!
ret,
"SleepConditionVariableCS should return FALSE on untriggered condvar\n");
2075 if (pInitializeSRWLock)
2081 ok(!
ret,
"SleepConditionVariableSRW should return FALSE on untriggered condvar\n");
2085 ret = pSleepConditionVariableSRW(
cv, &
condvar_srwlock, 10, CONDITION_VARIABLE_LOCKMODE_SHARED);
2088 ok(!
ret,
"SleepConditionVariableSRW should return FALSE on untriggered condvar\n");
2118#if defined(__i386__) || defined(__x86_64__)
2119#include "pshpack1.h"
2208 pReleaseSRWLockExclusive(
lock);
2215 pReleaseSRWLockExclusive(
lock);
2222 pReleaseSRWLockShared(
lock);
2226 pAcquireSRWLockExclusive(
lock);
2232 pReleaseSRWLockExclusive(
lock);
2236 pAcquireSRWLockShared(
lock);
2242 pReleaseSRWLockShared(
lock);
2243 pAcquireSRWLockShared(
lock);
2252 pReleaseSRWLockShared(
lock);
2255 if (!pTryAcquireSRWLockExclusive)
2260 if (pTryAcquireSRWLockExclusive(
lock))
2262 if (pTryAcquireSRWLockShared(
lock))
2264 if (pTryAcquireSRWLockExclusive(
lock))
2266 pReleaseSRWLockExclusive(
lock);
2271 if (pTryAcquireSRWLockShared(
lock))
2273 if (pTryAcquireSRWLockShared(
lock))
2274 pReleaseSRWLockShared(
lock);
2277 if (pTryAcquireSRWLockExclusive(
lock))
2279 pReleaseSRWLockShared(
lock);
2284 pAcquireSRWLockExclusive(
lock);
2290 pReleaseSRWLockExclusive(
lock);
2291 pAcquireSRWLockShared(
lock);
2297 pReleaseSRWLockShared(
lock);
2298 pAcquireSRWLockShared(
lock);
2303 pAcquireSRWLockExclusive(
lock);
2306 pReleaseSRWLockExclusive(
lock);
2308 pAcquireSRWLockShared(
lock);
2309 pAcquireSRWLockShared(
lock);
2315 pReleaseSRWLockShared(
lock);
2321 pReleaseSRWLockShared(
lock);
2334 pAcquireSRWLockExclusive(
lock);
2339 pAcquireSRWLockExclusive(
lock);
2342 pReleaseSRWLockExclusive(
lock);
2343 pAcquireSRWLockExclusive(
lock);
2348 pAcquireSRWLockShared(
lock);
2351 pReleaseSRWLockShared(
lock);
2352 pAcquireSRWLockShared(
lock);
2357 pAcquireSRWLockExclusive(
lock);
2360 pReleaseSRWLockExclusive(
lock);
2361 pAcquireSRWLockShared(
lock);
2362 pAcquireSRWLockShared(
lock);
2363 pReleaseSRWLockShared(
lock);
2364 pReleaseSRWLockShared(
lock);
2370 pAcquireSRWLockExclusive(
lock);
2373 pReleaseSRWLockExclusive(
lock);
2379 pAcquireSRWLockShared(
lock);
2380 pReleaseSRWLockShared(
lock);
2390 pAcquireSRWLockExclusive(
lock);
2395 pReleaseSRWLockExclusive(
lock);
2398 if (!pTryAcquireSRWLockExclusive)
2403 if (pTryAcquireSRWLockShared(
lock))
2405 if (pTryAcquireSRWLockExclusive(
lock))
2412 if (pTryAcquireSRWLockShared(
lock))
2413 pReleaseSRWLockShared(
lock);
2416 if (pTryAcquireSRWLockExclusive(
lock))
2424 if (pTryAcquireSRWLockShared(
lock))
2426 pReleaseSRWLockShared(
lock);
2429 if (pTryAcquireSRWLockExclusive(
lock))
2433 pReleaseSRWLockShared(
lock);
2437 if (pTryAcquireSRWLockShared(
lock))
2438 pReleaseSRWLockShared(
lock);
2441 if (pTryAcquireSRWLockExclusive(
lock))
2448 if (pTryAcquireSRWLockShared(
lock))
2449 pReleaseSRWLockShared(
lock);
2452 if (pTryAcquireSRWLockExclusive(
lock))
2459 if (pTryAcquireSRWLockShared(
lock))
2460 pReleaseSRWLockShared(
lock);
2463 if (pTryAcquireSRWLockExclusive(
lock))
2464 pReleaseSRWLockExclusive(
lock);
2484 pAcquireSRWLockShared(
lock);
2487 pReleaseSRWLockShared(
lock);
2492 if (!pTryAcquireSRWLockExclusive)
2495 win_skip(
"no srw trylock support.\n");
2508 if (!pInitializeSRWLock)
2511 win_skip(
"no srw lock support.\n");
2515 pInitializeSRWLock(
lock);
2532 "thread commands were executed in the wrong order (occurred %ld times).\n",
2536 "AcquireSRWLockExclusive didn't block when called multiple times from the same thread (occurred %ld times).\n",
2540 "AcquireSRWLockShared didn't block when the same thread holds an exclusive lock (occurred %ld times).\n",
2544 "AcquireSRWLockExclusive didn't block when the same thread holds a shared lock (occurred %ld times).\n",
2548 "AcquireSRWLockExclusive didn't block when a second thread holds the exclusive lock (occurred %ld times).\n",
2552 "thread waiting for exclusive access to the SHMLock was not preferred (occurred %ld times).\n",
2556 "TryAcquireSRWLockExclusive didn't behave as expected (occurred %ld times).\n",
2560 "TryAcquireSRWLockShared didn't behave as expected (occurred %ld times).\n",
2613 DWORD cnt1, cnt2, cnt3;
2615 if (!pInitializeSRWLock) {
2617 win_skip(
"no srw lock support.\n");
2623 cnt1 = cnt2 = cnt3 = 0;
2643 trace(
"number of shared accesses per thread are c1 %ld, c2 %ld, c3 %ld\n", cnt1, cnt2, cnt3);
2651 if (!pInitializeSRWLock) {
2653 win_skip(
"no srw lock support.\n");
2660 ok(*
u.l == 0,
"expected 0x0, got %lx\n", *
u.l);
2696 HANDLE *semaphores = (
void *)userdata;
2702 HANDLE *semaphores = (
void *)userdata;
2764 while (
info->running)
2812 for (
i = 0;
i < 1000 &&
info.running;
i++)
2860 void *vectored_handler;
2871 "Unexpected debug info pointer %p.\n",
cs.DebugInfo);
2873 ok(
cs.DebugInfo ==
NULL,
"Unexpected debug info pointer %p.\n",
cs.DebugInfo);
2875 if (!pInitializeCriticalSectionEx)
2877 win_skip(
"InitializeCriticalSectionEx isn't available, skipping tests.\n");
2882 ret = pInitializeCriticalSectionEx(&
cs, 0, 0);
2883 ok(
ret,
"Failed to initialize critical section.\n");
2885 "Unexpected debug info pointer %p.\n",
cs.DebugInfo);
2887 ok(
cs.DebugInfo ==
NULL,
"Unexpected debug info pointer %p.\n",
cs.DebugInfo);
2890 ret = pInitializeCriticalSectionEx(&
cs, 0, CRITICAL_SECTION_NO_DEBUG_INFO);
2891 ok(
ret,
"Failed to initialize critical section.\n");
2892 ok(
cs.DebugInfo == (
void *)(
ULONG_PTR)-1,
"Unexpected debug info pointer %p.\n",
cs.DebugInfo);
2894 ok(
cs.DebugInfo ==
NULL,
"Unexpected debug info pointer %p.\n",
cs.DebugInfo);
2897 ret = pInitializeCriticalSectionEx(&
cs, 0, 0);
2898 ok(
ret,
"Failed to initialize critical section.\n");
2900 "Unexpected debug info pointer %p.\n",
cs.DebugInfo);
2902 ok(
cs.DebugInfo ==
NULL,
"Unexpected debug info pointer %p.\n",
cs.DebugInfo);
2907 "Failed to initialize critical section, error %lu.\n",
GetLastError());
2910 ret = pInitializeCriticalSectionEx(&
cs, 0, 0);
2911 ok(
ret,
"Failed to initialize critical section.\n");
2913 ok(
cs.DebugInfo &&
cs.DebugInfo != (
void *)(
ULONG_PTR)-1,
"Unexpected debug info pointer %p.\n",
cs.DebugInfo);
2916 ok(
ret,
"Failed to enter critical section.\n");
2922 ok(
ret,
"Failed to enter critical section.\n");
2926 ok(
cs.DebugInfo ==
NULL,
"Unexpected debug info pointer %p.\n",
cs.DebugInfo);
2928 ret = pInitializeCriticalSectionEx(&
cs, 0, 0);
2930 old =
cs.LockSemaphore;
2931 cs.LockSemaphore = (
HANDLE)0xdeadbeef;
2937 ok(
cs.LockCount,
"got %ld.\n",
cs.LockCount);
2939 RemoveVectoredExceptionHandler(vectored_handler);
2940 cs.LockSemaphore = old;
2985 ok(!
ret,
"QueueUserAPC should fail\n");
3030 pInitializeConditionVariable = (
void *)
GetProcAddress(
hdll,
"InitializeConditionVariable");
3031 pSleepConditionVariableCS = (
void *)
GetProcAddress(
hdll,
"SleepConditionVariableCS");
3032 pSleepConditionVariableSRW = (
void *)
GetProcAddress(
hdll,
"SleepConditionVariableSRW");
3033 pWakeAllConditionVariable = (
void *)
GetProcAddress(
hdll,
"WakeAllConditionVariable");
3035 pInitializeCriticalSectionEx = (
void *)
GetProcAddress(
hdll,
"InitializeCriticalSectionEx");
3041 pTryAcquireSRWLockExclusive = (
void *)
GetProcAddress(
hdll,
"TryAcquireSRWLockExclusive");
3048 pRtlInterlockedPushListSListEx = (
void *)
GetProcAddress(
hntdll,
"RtlInterlockedPushListSListEx");
3082#if defined(__i386__) || defined(__x86_64__)
static struct sockaddr_in sa
#define InterlockedIncrement
#define InterlockedDecrement
#define STATUS_INVALID_HANDLE
BOOL WINAPI InitializeAcl(PACL pAcl, DWORD nAclLength, DWORD dwAclRevision)
BOOL WINAPI InitializeSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, DWORD dwRevision)
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define GetCurrentProcess()
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
#define FILE_ATTRIBUTE_NORMAL
#define ERROR_ACCESS_DENIED
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
DWORD WINAPI QueueUserAPC(IN PAPCFUNC pfnAPC, IN HANDLE hThread, IN ULONG_PTR dwData)
DWORD WINAPI ResumeThread(IN HANDLE hThread)
DWORD WINAPI SuspendThread(IN HANDLE hThread)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI TerminateThread(IN HANDLE hThread, IN DWORD dwExitCode)
DWORD WINAPI DECLSPEC_HOTPATCH WaitForMultipleObjectsEx(DWORD count, const HANDLE *handles, BOOL wait_all, DWORD timeout, BOOL alertable)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(SECURITY_ATTRIBUTES *sa, BOOL manual_reset, BOOL initial_state, LPCSTR name)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenMutexW(DWORD access, BOOL inherit, LPCWSTR name)
DWORD WINAPI DECLSPEC_HOTPATCH SignalObjectAndWait(HANDLE signal, HANDLE wait, DWORD timeout, BOOL alertable)
void WINAPI DECLSPEC_HOTPATCH Sleep(DWORD timeout)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenEventW(DWORD access, BOOL inherit, LPCWSTR name)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(HANDLE handle)
BOOL WINAPI DECLSPEC_HOTPATCH ChangeTimerQueueTimer(HANDLE queue, HANDLE timer, ULONG when, ULONG period)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateMutexA(SECURITY_ATTRIBUTES *sa, BOOL owner, LPCSTR name)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreW(SECURITY_ATTRIBUTES *sa, LONG initial, LONG max, LPCWSTR name)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(SECURITY_ATTRIBUTES *sa, BOOL manual_reset, BOOL initial_state, LPCWSTR name)
BOOL WINAPI DECLSPEC_HOTPATCH DeleteTimerQueueTimer(HANDLE queue, HANDLE timer, HANDLE event)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(HANDLE handle)
DWORD WINAPI DECLSPEC_HOTPATCH SleepEx(DWORD timeout, BOOL alertable)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenSemaphoreW(DWORD access, BOOL inherit, LPCWSTR name)
DWORD WINAPI DECLSPEC_HOTPATCH WaitForMultipleObjects(DWORD count, const HANDLE *handles, BOOL wait_all, DWORD timeout)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseSemaphore(HANDLE handle, LONG count, LONG *previous)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenEventA(DWORD access, BOOL inherit, LPCSTR name)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenWaitableTimerW(DWORD access, BOOL inherit, LPCWSTR name)
DWORD WINAPI DECLSPEC_HOTPATCH WaitForSingleObject(HANDLE handle, DWORD timeout)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseMutex(HANDLE handle)
BOOL WINAPI DECLSPEC_HOTPATCH CreateTimerQueueTimer(PHANDLE timer, HANDLE queue, WAITORTIMERCALLBACK callback, PVOID arg, DWORD when, DWORD period, ULONG flags)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateTimerQueue(void)
BOOL WINAPI DECLSPEC_HOTPATCH DeleteTimerQueueEx(HANDLE queue, HANDLE event)
_ACRTIMP void __cdecl longjmp(jmp_buf, int)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLdouble GLdouble GLdouble GLdouble q
GLenum GLsizei GLuint GLint * bytesWritten
GLuint GLuint GLuint GLuint arg1
GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg3
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
#define EXCEPTION_CONTINUE_SEARCH
VOID(WINAPI * LPOVERLAPPED_COMPLETION_ROUTINE)(_In_ DWORD dwErrorCode, _In_ DWORD dwNumberOfBytesTransfered, _Inout_ LPOVERLAPPED lpOverlapped)
#define ERROR_ALREADY_EXISTS
#define FILE_FLAG_OVERLAPPED
#define FILE_FLAG_RANDOM_ACCESS
#define FILE_FLAG_DELETE_ON_CLOSE
#define ERROR_FILE_NOT_FOUND
static PEXPLICIT_ACCESSW *static HMODULE hmod
static PROCESS_INFORMATION pi
static DWORD WINAPI condvar_base_producer(void *arg)
static LONG srwlock_example_errors
static void test_crit_section(void)
static BOOL CALLBACK initonce_callback(INIT_ONCE *initonce, void *parameter, void **ctxt)
static void CALLBACK timer_queue_cb5(PVOID p, BOOLEAN timedOut)
static void test_alertable_wait(void)
static const LARGE_INTEGER *static const HANDLE const LARGE_INTEGER *static PSLIST_ENTRY PSLIST_ENTRY last
static void CALLBACK timer_queue_cb6(PVOID p, BOOLEAN timedOut)
static void test_semaphore(void)
static LONG condvar_consumer_sleepcnt
static LONG totalconsumed
static CONDITION_VARIABLE aligned_cv
static DWORD WINAPI srwlock_base_thread2(void *arg)
static struct @1824 srwlock_base_errors
static void CALLBACK timer_queue_cb1(PVOID p, BOOLEAN timedOut)
static void test_timer_queue(void)
static CONDITION_VARIABLE buffernotfull
static HANDLE modify_handle(HANDLE handle, DWORD modify)
static void CALLBACK timer_queue_cb3(PVOID p, BOOLEAN timedOut)
static DWORD WINAPI alertable_wait_thread(void *param)
static void test_WaitForSingleObject(void)
static void test_apc_deadlock(void)
static SRWLOCK condvar_srwlock
static DWORD WINAPI srwlock_base_thread1(void *arg)
static LPOVERLAPPED_COMPLETION_ROUTINE ULONG Flags
static void test_srwlock_base(SRWLOCK *lock)
static void CALLBACK timer_queue_cb4(PVOID p, BOOLEAN timedOut)
static void CALLBACK user_apc(ULONG_PTR unused)
static LONG condvar_producer_sleepcnt
static SRWLOCK srwlock_example
static void CALLBACK call_user_apc(ULONG_PTR arg1, ULONG_PTR arg2, ULONG_PTR arg3)
static LPOVERLAPPED_COMPLETION_ROUTINE Function
static void CALLBACK timer_queue_cb2(PVOID p, BOOLEAN timedOut)
static DWORD WINAPI srwlock_base_thread3(void *arg)
static void test_temporary_objects(void)
static void test_condvars_base(RTL_CONDITION_VARIABLE *cv)
LONG samethread_excl_excl
static DWORD WINAPI condvar_base_consumer(void *arg)
LONG multithread_excl_excl
static void test_srwlock_example(void)
static DWORD WINAPI thread_proc(LPVOID unused)
static void test_initonce(void)
#define init_fastcall_thunk()
static void test_mutex(void)
static void CALLBACK alertable_wait_apc(ULONG_PTR userdata)
static LONG srwlock_inside
static void test_WaitForMultipleObjects(void)
static DWORD WINAPI apc_deadlock_thread(void *param)
static LONG srwlock_protected_value
static LPVOID *static DWORD
LONG samethread_shared_excl
static void test_slist(void)
static void test_QueueUserAPC(void)
static jmp_buf bad_cs_jmpbuf
static const LARGE_INTEGER *static const HANDLE const LARGE_INTEGER *static PSLIST_ENTRY first
static SRWLOCK aligned_srwlock
LONG wrong_execution_order
static BOOL g_initcallback_ret
static void CALLBACK alertable_wait_apc2(ULONG_PTR userdata)
static void test_signalandwait(void)
static BOOL g_initcallback_called
static DWORD WINAPI condvar_consumer(LPVOID x)
static LONG WINAPI bad_cs_handler(EXCEPTION_POINTERS *eptr)
LONG samethread_excl_shared
static CRITICAL_SECTION buffercrit
static void test_srwlock_quirk(void)
static CRITICAL_SECTION condvar_crit
static void test_condvars_consumer_producer(void)
static void test_event(void)
static void test_iocp_callback(void)
static DWORD WINAPI srwlock_example_thread(LPVOID x)
static BOOL condvar_sleeperr
static struct @1823 unaligned_cv
#define call_func4(func, a, b, c, d)
static void CALLBACK iocp_callback(DWORD dwErrorCode, DWORD dwNumberOfBytesTransferred, LPOVERLAPPED lpOverlapped)
static void test_waitable_timer(void)
static CONDITION_VARIABLE buffernotempty
static LONG totalproduced
static LPVOID *static BOOL LPVOID *static LPVOID
static DWORD WINAPI condvar_producer(LPVOID x)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED lpOverlapped
#define ACCESS_SYSTEM_SECURITY
#define PAGE_EXECUTE_READWRITE
#define STATUS_INVALID_PARAMETER_3
int winetest_get_mainargs(char ***pargv)
BOOL WINAPI SetSecurityDescriptorDacl(PSECURITY_DESCRIPTOR pSecurityDescriptor, BOOL bDaclPresent, PACL pDacl, BOOL bDaclDefaulted)
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED * overlapped
PEXCEPTION_RECORD ExceptionRecord
#define EXCEPTION_NONCONTINUABLE
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
HANDLE WINAPI CreateWaitableTimerA(IN LPSECURITY_ATTRIBUTES lpTimerAttributes OPTIONAL, IN BOOL bManualReset, IN LPCSTR lpTimerName OPTIONAL)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreA(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL, IN LONG lInitialCount, IN LONG lMaximumCount, IN LPCSTR lpName OPTIONAL)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenMutexA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenSemaphoreA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
HANDLE WINAPI OpenWaitableTimerA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpTimerName)
#define SLIST_ENTRY(type)
Character const *const prefix
#define CONTAINING_RECORD(address, type, field)
#define STATUS_UNSUCCESSFUL
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
#define success(from, fromstr, to, tostr)
BOOL(WINAPI * PINIT_ONCE_FN)(_Inout_ PINIT_ONCE InitOnce, _Inout_opt_ PVOID Parameter, _Outptr_opt_result_maybenull_ PVOID *Context)
DWORD WINAPI GetLastError(void)
HANDLE WINAPI GetCurrentThread(void)
BOOL WINAPI TryEnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define WAIT_IO_COMPLETION
#define MAXIMUM_WAIT_OBJECTS
#define INIT_ONCE_CHECK_ONLY
#define SEMAPHORE_ALL_ACCESS
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define INIT_ONCE_INIT_FAILED
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define ERROR_GEN_FAILURE
#define ERROR_PRIVILEGE_NOT_HELD
#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO
#define WT_EXECUTELONGFUNCTION
#define EXCEPTION_SOFTWARE_ORIGINATE
#define QueryDepthSList(SListHead)
#define InterlockedPushEntrySList(SListHead, SListEntry)
#define InterlockedFlushSList(SListHead)
#define InterlockedPopEntrySList(SListHead)
FORCEINLINE VOID InitializeSListHead(_Out_ PSLIST_HEADER SListHead)
#define SECURITY_DESCRIPTOR_REVISION