msvcrt/tests: Add CREATE_SUSPENDED test for _beginthreadex().
Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a4af8bb050
commit
d3ba02f35c
|
@ -587,6 +587,19 @@ static void test_thread_handle_close(void)
|
||||||
ok(ret, "ret = %d\n", ret);
|
ok(ret, "ret = %d\n", ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_thread_suspended(void)
|
||||||
|
{
|
||||||
|
HANDLE hThread;
|
||||||
|
DWORD ret;
|
||||||
|
|
||||||
|
hThread = (HANDLE)_beginthreadex(NULL, 0, test_thread_func_ex, NULL, CREATE_SUSPENDED, NULL);
|
||||||
|
ok(hThread != NULL, "_beginthreadex failed (%d)\n", errno);
|
||||||
|
ret = ResumeThread(hThread);
|
||||||
|
ok(ret == 1, "suspend count = %d\n", ret);
|
||||||
|
ret = WaitForSingleObject(hThread, 200);
|
||||||
|
ok(ret == WAIT_OBJECT_0, "ret = %d\n", ret);
|
||||||
|
}
|
||||||
|
|
||||||
static int __cdecl _lfind_s_comp(void *ctx, const void *l, const void *r)
|
static int __cdecl _lfind_s_comp(void *ctx, const void *l, const void *r)
|
||||||
{
|
{
|
||||||
*(int *)ctx = 0xdeadc0de;
|
*(int *)ctx = 0xdeadc0de;
|
||||||
|
@ -684,5 +697,6 @@ START_TEST(misc)
|
||||||
test_qsort_s();
|
test_qsort_s();
|
||||||
test_math_functions();
|
test_math_functions();
|
||||||
test_thread_handle_close();
|
test_thread_handle_close();
|
||||||
|
test_thread_suspended();
|
||||||
test__lfind_s();
|
test__lfind_s();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue