13 #if defined(XSENS_DEBUG) && defined(_MSC_VER) 14 #pragma warning(disable : 4985) 20 #pragma warning(disable : 4127) 29 #ifndef WINVER // Allow use of features specific to Windows XP or later. 31 0x0502 // Change this to the appropriate value to target other versions of 35 #ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. 36 #define _WIN32_WINNT \ 37 0x0502 // Change this to the appropriate value to target other versions of 41 #ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or 43 #define _WIN32_WINDOWS \ 44 0x0410 // Change this to the appropriate value to target Windows Me or 48 #ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. 50 0x0600 // Change this to the appropriate value to target other versions of 75 #define XSENS_THREAD_RETURN DWORD 76 #define XSENS_THREAD_TYPE WINAPI 77 #define XSENS_THREAD_PARAM LPVOID 79 #define XSENS_INVALID_THREAD INVALID_HANDLE_VALUE 90 #define xsYield() Sleep(0) 101 #define xsStartThread(func, param, pid) \ 102 CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)func, param, 0, pid) 106 #define xsGetCurrentThreadId() GetCurrentThreadId() 107 #define xsGetCurrentThreadHandle() GetCurrentThread() 108 #define xsSuspendThread(thrd) SuspendThread(thrd) 109 #define xsResumeThread(thrd) ResumeThread(thrd) 110 #define xsSetThreadPriority(thrd, prio) SetThreadPriority(thrd, prio) 111 #define xsGetThreadPriority(thrd) GetThreadPriority(thrd) 116 #include <semaphore.h> 137 #define XSENS_THREAD_RETURN void* // DWORD 138 #define XSENS_THREAD_TYPE // WINAPI 139 #define XSENS_THREAD_PARAM void* // LPVOID 141 #define XSENS_INVALID_THREAD 0 // INVALID_HANDLE_VALUE 145 #define xsYield() pthread_yield_np() 147 #define xsYield() pthread_yield() // Sleep(0) 157 #define xsGetCurrentThreadId() pthread_self() 158 #define xsSuspendThread(thrd) 159 #define xsResumeThread(thrd) 160 #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)