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