MRPT  2.0.4
Enumerations | Functions
Scheduler helpers (in #include <mrpt/system/scheduler.h>)

Detailed Description

Collaboration diagram for Scheduler helpers (in #include <mrpt/system/scheduler.h>):

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 22 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 33 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 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020