is CreateThread(CREATE_SUSPENDED) fully functional?

Joerg-Cyril.Hoehle at Joerg-Cyril.Hoehle at
Thu Sep 27 02:13:52 CDT 2012


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,

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.

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