Re: [PATCH 3/3] msvcp120: implement _Thrd_create/join
Oct. 29, 2015
10:52 a.m.
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
3800
Age (days ago)
3800
Last active (days ago)
0 comments
1 participants
participants (1)
-
Piotr Caban