is CreateThread(CREATE_SUSPENDED) fully functional?
Joerg-Cyril.Hoehle at t-systems.com
Joerg-Cyril.Hoehle at t-systems.com
Thu Sep 27 02:13:52 CDT 2012
Hi,
Recently I thought I found a use-case for CreateThread(CREATE_SUSPENDED).
The idiom is to get the thread handle before the thread starts a life on its own.
I looked at the kernel tests,
http://source.winehq.org/source/dlls/kernel32/tests/thread.c#L460
However, both invocations with CREATE_SUSPENDED actually test the
pair CreateThread + SuspendThread. The tests do not prove that CREATE_SUSPENDED works!
They only prove that the suspend counter and perhaps SuspendThread work.
a) Does Wine not support CREATE_SUSPENDED, so that the tests do the best they can?
In such a case, a WARN("ignoring SUSPENDED flag, beware of race conditions\n") would be appropriate.
or
b) CREATE_SUSPENDED is fully supported on all platforms.
Then the tests need some refinement.
Thank you,
Jörg Höhle
More information about the wine-devel
mailing list