13 #if defined(XSENS_DEBUG) && defined(_MSC_VER) 14 #pragma warning (disable: 4985) 20 #pragma warning(disable: 4127) 28 #ifndef WINVER // Allow use of features specific to Windows XP or later. 29 #define WINVER 0x0502 // Change this to the appropriate value to target other versions of Windows. 32 #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. 33 #define _WIN32_WINNT 0x0502 // Change this to the appropriate value to target other versions of Windows. 36 #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. 37 #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. 40 #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. 41 #define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. 63 #define XSENS_THREAD_RETURN DWORD 64 #define XSENS_THREAD_TYPE WINAPI 65 #define XSENS_THREAD_PARAM LPVOID 67 #define XSENS_INVALID_THREAD INVALID_HANDLE_VALUE 75 #define xsYield() Sleep(0) 86 #define xsStartThread(func,param,pid) CreateThread(NULL,0,(LPTHREAD_START_ROUTINE) func,param,0,pid) 90 #define xsGetCurrentThreadId() GetCurrentThreadId() 91 #define xsGetCurrentThreadHandle() GetCurrentThread() 92 #define xsSuspendThread(thrd) SuspendThread(thrd) 93 #define xsResumeThread(thrd) ResumeThread(thrd) 94 #define xsSetThreadPriority(thrd,prio) SetThreadPriority(thrd,prio) 95 #define xsGetThreadPriority(thrd) GetThreadPriority(thrd) 99 #include <semaphore.h> 120 #define XSENS_THREAD_RETURN void* // DWORD 121 #define XSENS_THREAD_TYPE // WINAPI 122 #define XSENS_THREAD_PARAM void* // LPVOID 124 #define XSENS_INVALID_THREAD 0 // INVALID_HANDLE_VALUE 128 #define xsYield() pthread_yield_np() 130 #define xsYield() pthread_yield() // Sleep(0) 140 #define xsGetCurrentThreadId() pthread_self() 141 #define xsSuspendThread(thrd) 142 #define xsResumeThread(thrd) 143 #define xsSetThreadPriority(thrd,prio) #define xsStartThread(func, param, pid)
Start a function as a thread.
XsThreadPriority
Thread priorities for xsSetThreadPriority() and xsGetThreadPriority()
HANDLE XsThread
A handle for a thread.
XSTYPES_DLL_API void xsNameThisThread(const char *threadName)