Difference between revisions of "r7.1.0:Typedef libshared pal thread return t"
Jump to navigation
Jump to search
(Created page with "{{DISPLAYTITLE:typedef libshared_pal_thread_return_t}} ==Source File== └───test_and_benchmark └───libshared └───inc └─...") |
(No difference)
|
Latest revision as of 07:57, 27 May 2016
Source File
└───test_and_benchmark └───libshared └───inc └───libshared libshared_porting_abstraction_layer_compiler.h
Typedef
typedef [type] libshared_pal_thread_return_t;
Optionality
This typedef is mandatory.
Example
typedef DWORD test_pal_thread_state_t;
Notes
When a thread function returns, it returns a value to the OS. This typedef is the type of than return value.
If we look at the Windows thread function prototype;
DWORD WINAPI ThreadProc( _In_ LPVOID lpParameter );
We see the return type is DWORD.
(The WINAPI part is actually a compiler directive and is handled in the abstraction layer by the LIBSHARED_PAL_THREAD_CALLING_CONVENTION define.)