[PATCH 3/3] msvcp120: implement _Thrd_create/join

Piotr Caban piotr.caban at gmail.com
Thu Oct 29 10:52:59 CDT 2015

On 10/29/15 15:50, Daniel Lehman wrote:
> +int __cdecl _Thrd_join(_Thrd_t thr, int *unk)
> +{
> +    DWORD ret;
> +
> +    TRACE("(%p %u %p)\n", thr.hnd, thr.id, unk);
> +    ret = WaitForSingleObject(thr.hnd, INFINITE);
> +    if (unk)
> +        GetExitCodeThread(thr.hnd, (DWORD *)unk);
Please rename the unk parameter. You already know that it's a thread 
exit code.

You should probably also exit earlier if WaitForSingleObject fails. It 
doesn't really make sense call GetExitCodeThread in this case. Probably 
there's also no need to close the handle if WaitForSingleObject fails.


More information about the wine-devel mailing list