Difference between pages "r7.1.1:Typedef libshared pal thread return t" and "r7.1.1:Typedef test pal thread return t"
(Difference between pages)
Jump to navigation
Jump to search
m (1 revision imported) |
m (1 revision imported) |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:typedef | {{DISPLAYTITLE:typedef test_pal_thread_return_t}} | ||
==Source File== | ==Source File== | ||
└───test | |||
└───src | |||
└───porting_abstraction_layer_operating_system.h | |||
==Typedef== | ==Typedef== | ||
typedef [type] | typedef [type] test_pal_thread_return_t; | ||
==Optionality== | ==Optionality== | ||
This typedef is mandatory. | This typedef is mandatory. | ||
==Notes== | ==Notes== | ||
Line 25: | Line 20: | ||
We see the return type is ''DWORD''. | We see the return type is ''DWORD''. | ||
(The ''WINAPI'' part is actually a compiler directive and is handled in the abstraction layer by the ''[[r7.1.1:define | (The ''WINAPI'' part is actually a compiler directive and is handled in the abstraction layer by the ''[[r7.1.1:define TEST_PAL_CALLING_CONVENTION|TEST_PAL_CALLING_CONVENTION]]'' define.) | ||
==Example== | |||
typedef DWORD test_pal_thread_state_t; | |||
==See Also== | ==See Also== | ||
* [[r7.1.1:Porting Guide ( | * [[r7.1.1:Porting Guide (test)|Porting Guide (test)]] |
Latest revision as of 20:16, 17 February 2017
Source File
└───test └───src └───porting_abstraction_layer_operating_system.h
Typedef
typedef [type] test_pal_thread_return_t;
Optionality
This typedef is mandatory.
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 TEST_PAL_CALLING_CONVENTION define.)
Example
typedef DWORD test_pal_thread_state_t;