MRPT  1.9.9
Scheduler helpers

Detailed Description

(in #include <mrpt/system/scheduler.h>)

Collaboration diagram for Scheduler helpers:

Enumerations

enum  mrpt::system::TProcessPriority { mrpt::system::ppIdle = 0, mrpt::system::ppNormal, mrpt::system::ppHigh, mrpt::system::ppVeryHigh }
 The type for cross-platform process (application) priorities. More...
 
enum  mrpt::system::TThreadPriority {
  mrpt::system::tpLowests = -15, mrpt::system::tpLower = -2, mrpt::system::tpLow = -1, mrpt::system::tpNormal = 0,
  mrpt::system::tpHigh = 1, mrpt::system::tpHigher = 2, mrpt::system::tpHighest = 15
}
 The type for cross-platform thread priorities. More...
 

Functions

void mrpt::system::changeCurrentThreadPriority (TThreadPriority priority)
 Change the priority of the current thread - for Windows, see also changeCurrentProcessPriority() More...
 
void mrpt::system::changeCurrentProcessPriority (TProcessPriority priority)
 Change the priority of the given process (it applies to all the threads, plus independent modifiers for each thread). More...
 

Enumeration Type Documentation

◆ TProcessPriority

The type for cross-platform process (application) priorities.

See also
changeCurrentProcessPriority
Enumerator
ppIdle 
ppNormal 
ppHigh 
ppVeryHigh 

Definition at line 21 of file scheduler.h.

◆ TThreadPriority

The type for cross-platform thread priorities.

See also
changeThreadPriority
Enumerator
tpLowests 

Win32: THREAD_PRIORITY_IDLE.

tpLower 

Win32: THREAD_PRIORITY_LOWEST.

tpLow 

Win32: THREAD_PRIORITY_BELOW_NORMAL.

tpNormal 

Win32: THREAD_PRIORITY_NORMAL.

tpHigh 

Win32: THREAD_PRIORITY_ABOVE_NORMAL.

tpHigher 

Win32: THREAD_PRIORITY_HIGHEST.

tpHighest 

Win32: THREAD_PRIORITY_TIME_CRITICAL.

Definition at line 32 of file scheduler.h.

Function Documentation

◆ changeCurrentProcessPriority()

void mrpt::system::changeCurrentProcessPriority ( TProcessPriority  priority)

Change the priority of the given process (it applies to all the threads, plus independent modifiers for each thread).

  • Windows: See SetPriorityClass
  • Linux (pthreads): Requires root permissions to increase process priority! Internally it calls nice(), so it has no effect if () was called and a SCHED_RR is already active.
    See also
    createThread, changeThreadPriority

Definition at line 112 of file scheduler.cpp.

References mrpt::system::ppHigh, mrpt::system::ppIdle, mrpt::system::ppNormal, mrpt::system::ppVeryHigh, and THROW_EXCEPTION.

◆ changeCurrentThreadPriority()

void mrpt::system::changeCurrentThreadPriority ( TThreadPriority  priority)

Change the priority of the current thread - for Windows, see also changeCurrentProcessPriority()

Definition at line 43 of file scheduler.cpp.

References mrpt::system::tpHigh, mrpt::system::tpHigher, mrpt::system::tpHighest, mrpt::system::tpLow, mrpt::system::tpLower, mrpt::system::tpLowests, and mrpt::system::tpNormal.

Referenced by thread_client().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020