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

List:       wine-devel
Subject:    Re: [PATCH 3/3] msvcp120: implement _Thrd_create/join
From:       Piotr Caban <piotr.caban () gmail ! com>
Date:       2015-10-29 15:52:59
Message-ID: 563240DB.404 () gmail ! com
[Download RAW message or body]

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.

Thanks,
Piotr


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

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