Etaash Mathamsetty (@etaash.mathamsetty) commented about dlls/kernel32/tests/sync.c:
+static DWORD WINAPI barrier_worker(LPVOID b) {
- SYNCHRONIZATION_BARRIER *barrier = (SYNCHRONIZATION_BARRIER*)b;
- EnterSynchronizationBarrier(barrier, 0);
- return 0;
+}
+static void test_barrier(void) +{
- SYNCHRONIZATION_BARRIER barrier;
- DWORD dummy;
- DWORD r;
- r = InitializeSynchronizationBarrier(&barrier, 3, 0);
- ok( r == TRUE, "init sync barrier failed\n");
- CreateThread(NULL, 0, barrier_worker, &barrier, 0, &dummy);
Generally, it's better to have tests in a seperate commit. It would also be nice to have a test to see what happens when the barrier is reused, that bakin engine you linked seems to be reusing them, so it would be good to test the behavior in that situation.