Main MRPT website > C++ reference for MRPT 1.5.7
Macros | Typedefs | Enumerations | Functions
xsthread.h File Reference
#include "xstime.h"
#include <windows.h>
Include dependency graph for xsthread.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WINVER   0x0502
 
#define _WIN32_WINNT   0x0502
 
#define _WIN32_WINDOWS   0x0410
 
#define _WIN32_IE   0x0600
 
#define XSENS_THREAD_RETURN   DWORD
 
#define XSENS_THREAD_TYPE   WINAPI
 
#define XSENS_THREAD_PARAM   LPVOID
 
#define XSENS_INVALID_THREAD   INVALID_HANDLE_VALUE
 
#define xsYield()   Sleep(0)
 Release the remainder of the timeslice so other operations can run. On Windows this is done using Sleep(0), since this is the most reliable method. SwitchToThread can cause delays since it does not allow the thread to resume on a different core. Sleep http://msdn.microsoft.com/en-us/library/ms686298%28v=vs.85%29.aspx SwitchToThread http://msdn.microsoft.com/en-us/library/ms686352%28v=vs.85%29.aspx. More...
 
#define xsStartThread(func, param, pid)   CreateThread(NULL,0,(LPTHREAD_START_ROUTINE) func,param,0,pid)
 Start a function as a thread. More...
 
#define xsGetCurrentThreadId()   GetCurrentThreadId()
 
#define xsGetCurrentThreadHandle()   GetCurrentThread()
 
#define xsSuspendThread(thrd)   SuspendThread(thrd)
 
#define xsResumeThread(thrd)   ResumeThread(thrd)
 
#define xsSetThreadPriority(thrd, prio)   SetThreadPriority(thrd,prio)
 
#define xsGetThreadPriority(thrd)   GetThreadPriority(thrd)
 

Typedefs

typedef HANDLE XsThread
 A handle for a thread. More...
 
typedef DWORD XsThreadId
 
typedef enum XsThreadPriority XsThreadPriority
 

Enumerations

enum  XsThreadPriority {
  XS_THREAD_PRIORITY_LOWEST = THREAD_PRIORITY_IDLE, XS_THREAD_PRIORITY_LOWER = THREAD_PRIORITY_LOWEST, XS_THREAD_PRIORITY_LOW = THREAD_PRIORITY_BELOW_NORMAL, XS_THREAD_PRIORITY_NORMAL = THREAD_PRIORITY_NORMAL,
  XS_THREAD_PRIORITY_HIGH = THREAD_PRIORITY_ABOVE_NORMAL, XS_THREAD_PRIORITY_HIGHER = THREAD_PRIORITY_HIGHEST, XS_THREAD_PRIORITY_HIGHEST = THREAD_PRIORITY_TIME_CRITICAL
}
 Thread priorities for xsSetThreadPriority() and xsGetThreadPriority() More...
 

Functions

XSTYPES_DLL_API void xsNameThisThread (const char *threadName)
 

Macro Definition Documentation

◆ _WIN32_IE

#define _WIN32_IE   0x0600

Definition at line 41 of file xsthread.h.

◆ _WIN32_WINDOWS

#define _WIN32_WINDOWS   0x0410

Definition at line 37 of file xsthread.h.

◆ _WIN32_WINNT

#define _WIN32_WINNT   0x0502

Definition at line 33 of file xsthread.h.

◆ WINVER

#define WINVER   0x0502

Definition at line 29 of file xsthread.h.

◆ XSENS_INVALID_THREAD

#define XSENS_INVALID_THREAD   INVALID_HANDLE_VALUE

Definition at line 67 of file xsthread.h.

Referenced by UsbInterface::open().

◆ XSENS_THREAD_PARAM

#define XSENS_THREAD_PARAM   LPVOID

Definition at line 65 of file xsthread.h.

◆ XSENS_THREAD_RETURN

#define XSENS_THREAD_RETURN   DWORD

Definition at line 63 of file xsthread.h.

◆ XSENS_THREAD_TYPE

#define XSENS_THREAD_TYPE   WINAPI

Definition at line 64 of file xsthread.h.

◆ xsGetCurrentThreadHandle

#define xsGetCurrentThreadHandle ( )    GetCurrentThread()

Definition at line 91 of file xsthread.h.

◆ xsGetCurrentThreadId

#define xsGetCurrentThreadId ( )    GetCurrentThreadId()

Definition at line 90 of file xsthread.h.

◆ xsGetThreadPriority

#define xsGetThreadPriority (   thrd)    GetThreadPriority(thrd)

Definition at line 95 of file xsthread.h.

◆ xsResumeThread

#define xsResumeThread (   thrd)    ResumeThread(thrd)

Definition at line 93 of file xsthread.h.

◆ xsSetThreadPriority

#define xsSetThreadPriority (   thrd,
  prio 
)    SetThreadPriority(thrd,prio)

Definition at line 94 of file xsthread.h.

◆ xsStartThread

#define xsStartThread (   func,
  param,
  pid 
)    CreateThread(NULL,0,(LPTHREAD_START_ROUTINE) func,param,0,pid)

Start a function as a thread.

Definition at line 86 of file xsthread.h.

Referenced by UsbInterface::open().

◆ xsSuspendThread

#define xsSuspendThread (   thrd)    SuspendThread(thrd)

Definition at line 92 of file xsthread.h.

◆ xsYield

#define xsYield ( )    Sleep(0)

Release the remainder of the timeslice so other operations can run. On Windows this is done using Sleep(0), since this is the most reliable method. SwitchToThread can cause delays since it does not allow the thread to resume on a different core. Sleep http://msdn.microsoft.com/en-us/library/ms686298%28v=vs.85%29.aspx SwitchToThread http://msdn.microsoft.com/en-us/library/ms686352%28v=vs.85%29.aspx.

Definition at line 75 of file xsthread.h.

Typedef Documentation

◆ XsThread

typedef HANDLE XsThread

A handle for a thread.

Definition at line 78 of file xsthread.h.

◆ XsThreadId

typedef DWORD XsThreadId

Definition at line 82 of file xsthread.h.

◆ XsThreadPriority

Definition at line 155 of file xsthread.h.

Function Documentation

◆ xsNameThisThread()

XSTYPES_DLL_API void xsNameThisThread ( const char *  threadName)



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019