1

Is it better that the return value of thread function is pointer on linux than DWORD on windows [closed]

view story
linux-howto

http://stackoverflow.com – The return value of a thread is a void *. So I think I have three way to get the return value Allocate a buffer for return value(If allocation is not thread safe. It will come out with some problem) Define a static global variable with the thread function in the same file(I think't this is good way). save the return value into the struct parameter of thread function And on windows, the return value is DWORD. I think this is convenient to get the return value。 I don't need to prepare the buffer for return value in thread. So I think the windows's way is better. But I'm not sure (HowTos)