r6.0.1:thread_return_t
Jump to navigation
Jump to search
Source File
/test/src/abstraction.h
Typedef
typedef [type] thread_return_t;
Notes
To abstract away the differences in the return value in the thread function prototype on different platforms, liblfds uses a typedef.
Examples
On Windows, the thread function prototype, ThreadProc, is;
DWORD WINAPI ThreadProc( __in LPVOID lpParameter );
We see that the return type is a DWORD. (WINAPI is a define for __stdcall, which specifies the calling convention, rather than the return type; we are only interested in the return type).
As such, on the Windows platform, thread_return_t looks like this;
typedef DWORD thread_return_t