2 #if (defined _WIN32 && defined _MSC_VER && !defined WIN_KERNEL_BUILD)
3 /* TRD : any Windows (user-mode) on any CPU with the Microsoft C compiler
5 _WIN32 indicates 64-bit or 32-bit Windows
6 _MSC_VER indicates Microsoft C compiler
7 !WIN_KERNEL_BUILD indicates Windows user-mode
11 typedef HANDLE thread_state_t;
12 typedef DWORD thread_return_t;
13 #define CALLING_CONVENTION WINAPI
16 #if (defined _WIN32 && defined _MSC_VER && defined WIN_KERNEL_BUILD)
17 /* TRD : any Windows (kernel-mode) on any CPU with the Microsoft C compiler
19 _WIN32 indicates 64-bit or 32-bit Windows
20 _MSC_VER indicates Microsoft C compiler
21 WIN_KERNEL_BUILD indicates Windows kernel
25 typedef HANDLE thread_state_t;
26 typedef VOID thread_return_t;
27 #define CALLING_CONVENTION
30 #if (defined __unix__ && defined __GNUC__)
31 /* TRD : any UNIX on any CPU with GCC
33 __unix__ indicates Solaris, Linux, HPUX, etc
34 __GNUC__ indicates GCC
39 typedef pthread_t thread_state_t;
40 typedef void * thread_return_t;
41 #define CALLING_CONVENTION
44 typedef thread_return_t (CALLING_CONVENTION *thread_function_t)( void *thread_user_state );
46 /***** public prototypes *****/
47 unsigned int abstraction_cpu_count( void );
48 int abstraction_thread_start( thread_state_t *thread_state, unsigned int cpu, thread_function_t thread_function, void *thread_user_state );
49 void abstraction_thread_wait( thread_state_t thread_state );