[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: is CreateThread(CREATE_SUSPENDED) fully functional?
From:       André_Hentschel <nerv () dawncrow ! de>
Date:       2012-09-27 17:17:42
Message-ID: 50648A36.10607 () dawncrow ! de
[Download RAW message or body]

Am 27.09.2012 09:13, schrieb Joerg-Cyril.Hoehle@t-systems.com:
> 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_SU=
SPENDED 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 condition=
s\n") would be appropriate.
> =

> or
> b) CREATE_SUSPENDED is fully supported on all platforms.
> Then the tests need some refinement.

Why did you only had a look at the tests? I checked the source in 30 second=
s and answered the question for me:
CREATE_SUSPENDED is an essential part of the CreateThread Implementation.
Anyway, more tests are always welcome.

-- =


Best Regards, Andr=E9 Hentschel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic