Commit 26ee9134 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

ntdll: Re-implement RtlRegisterWait using TpSetWait.

This adds several internal flags to TP_WAIT object to support the implementation: * WT_EXECUTEONLYONCE: waits are re-queued unless it is set. * WT_EXECUTEINWAITTHREAD: call the callback in the wait thread when set. * WT_EXECUTEINIOTHREAD: call alertable NtWaitForMultipleObjects in wait thread when set, as well the callback in the wait thread, as for WT_EXECUTEINWAITTHREAD. The worker threads use non-alertable waits otherwise. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47843Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 304d8119
......@@ -1367,7 +1367,6 @@ static void CALLBACK waitthread_test_function(PVOID p, BOOLEAN TimerOrWaitFired)
SetEvent(param->trigger_event);
ret = WaitForSingleObject(param->wait_event, 100);
todo_wine
ok(ret == WAIT_TIMEOUT, "wait should have timed out\n");
SetEvent(param->complete_event);
}
......
......@@ -319,7 +319,7 @@ static void test_RtlRegisterWait(void)
result = WaitForSingleObject(semaphores[0], 200);
ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result);
ok(info.userdata == 1, "expected info.userdata = 1, got %u\n", info.userdata);
todo_wine ok(info.threadid == threadid, "unexpected different wait thread id %x\n", info.threadid);
ok(info.threadid == threadid, "unexpected different wait thread id %x\n", info.threadid);
result = WaitForSingleObject(semaphores[1], 0);
ok(result == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", result);
Sleep(50);
......@@ -350,7 +350,7 @@ static void test_RtlRegisterWait(void)
result = WaitForSingleObject(semaphores[0], 200);
ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result);
ok(info.userdata == 1, "expected info.userdata = 1, got %u\n", info.userdata);
todo_wine ok(info.threadid == threadid, "unexpected different wait thread id %x\n", info.threadid);
ok(info.threadid == threadid, "unexpected different wait thread id %x\n", info.threadid);
result = WaitForSingleObject(semaphores[1], 0);
ok(result == WAIT_TIMEOUT, "WaitForSingleObject returned %u\n", result);
Sleep(50);
......@@ -433,7 +433,6 @@ static void test_RtlRegisterWait(void)
ok(!status, "RtlDeregisterWaitEx failed with status %x\n", status);
ok(info.userdata == 0, "expected info.userdata = 0, got %u\n", info.userdata);
result = WaitForSingleObject(event, 200);
todo_wine
ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result);
/* test RtlDeregisterWaitEx after wait expired */
......@@ -470,7 +469,6 @@ static void test_RtlRegisterWait(void)
ok(!status, "RtlDeregisterWaitEx failed with status %x\n", status);
ok(info.userdata == 0x10000, "expected info.userdata = 0x10000, got %u\n", info.userdata);
result = WaitForSingleObject(event, 200);
todo_wine
ok(result == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", result);
/* test RtlDeregisterWaitEx while callback is running */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment