Files
openairinterface5g/openair2/UTIL/LFDS/liblfds6.1.1/test/src/abstraction.h
T
Lionel Gauthier 059a0a3fdc astyle --recursive --indent=spaces=2 --style=kr --indent-col1-comments --break-blocks --convert-tabs --max-code-length=200
This is done for better merging branch/LG_PRE_RELEASE_0.3 into trunk (same process is applied on this branch)

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7073 818b1a75-f10b-46b9-bf7c-635c3b92a50f
2015-04-09 09:29:12 +00:00

51 lines
1.7 KiB
C

/***** defines *****/
#if (defined _WIN32 && defined _MSC_VER && !defined WIN_KERNEL_BUILD)
/* TRD : any Windows (user-mode) on any CPU with the Microsoft C compiler
_WIN32 indicates 64-bit or 32-bit Windows
_MSC_VER indicates Microsoft C compiler
!WIN_KERNEL_BUILD indicates Windows user-mode
*/
#include <windows.h>
typedef HANDLE thread_state_t;
typedef DWORD thread_return_t;
#define CALLING_CONVENTION WINAPI
#endif
#if (defined _WIN32 && defined _MSC_VER && defined WIN_KERNEL_BUILD)
/* TRD : any Windows (kernel-mode) on any CPU with the Microsoft C compiler
_WIN32 indicates 64-bit or 32-bit Windows
_MSC_VER indicates Microsoft C compiler
WIN_KERNEL_BUILD indicates Windows kernel
*/
#include <wdm.h>
typedef HANDLE thread_state_t;
typedef VOID thread_return_t;
#define CALLING_CONVENTION
#endif
#if (defined __unix__ && defined __GNUC__)
/* TRD : any UNIX on any CPU with GCC
__unix__ indicates Solaris, Linux, HPUX, etc
__GNUC__ indicates GCC
*/
#include <unistd.h>
#include <pthread.h>
#include <sched.h>
typedef pthread_t thread_state_t;
typedef void * thread_return_t;
#define CALLING_CONVENTION
#endif
typedef thread_return_t (CALLING_CONVENTION *thread_function_t)( void *thread_user_state );
/***** public prototypes *****/
unsigned int abstraction_cpu_count( void );
int abstraction_thread_start( thread_state_t *thread_state, unsigned int cpu, thread_function_t thread_function, void *thread_user_state );
void abstraction_thread_wait( thread_state_t thread_state );