MRPT  1.9.9
Enumerations | Functions
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 109 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().

Here is the caller graph for this function:



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020