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. 30 0x0502 // Change this to the appropriate value to target other versions of 34 #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. 35 #define _WIN32_WINNT \ 36 0x0502 // Change this to the appropriate value to target other versions of 40 #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or 42 #define _WIN32_WINDOWS \ 43 0x0410 // Change this to the appropriate value to target Windows Me or 47 #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. 49 0x0600 // Change this to the appropriate value to target other versions of 73 #define XSENS_THREAD_RETURN DWORD 74 #define XSENS_THREAD_TYPE WINAPI 75 #define XSENS_THREAD_PARAM LPVOID 77 #define XSENS_INVALID_THREAD INVALID_HANDLE_VALUE 88 #define xsYield() Sleep(0) 99 #define xsStartThread(func, param, pid) \ 100 CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)func, param, 0, pid) 104 #define xsGetCurrentThreadId() GetCurrentThreadId() 105 #define xsGetCurrentThreadHandle() GetCurrentThread() 106 #define xsSuspendThread(thrd) SuspendThread(thrd) 107 #define xsResumeThread(thrd) ResumeThread(thrd) 108 #define xsSetThreadPriority(thrd, prio) SetThreadPriority(thrd, prio) 109 #define xsGetThreadPriority(thrd) GetThreadPriority(thrd) 113 #include <semaphore.h> 135 #define XSENS_THREAD_RETURN void* // DWORD 136 #define XSENS_THREAD_TYPE // WINAPI 137 #define XSENS_THREAD_PARAM void* // LPVOID 139 #define XSENS_INVALID_THREAD 0 // INVALID_HANDLE_VALUE 143 #define xsYield() pthread_yield_np() 145 #define xsYield() pthread_yield() // Sleep(0) 155 #define xsGetCurrentThreadId() pthread_self() 156 #define xsSuspendThread(thrd) 157 #define xsResumeThread(thrd) 158 #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)