#include <MainThread.hpp>
A class which represents the main() thread.
Definition at line 52 of file MainThread.hpp.
RTT::os::MainThread::MainThread |
( |
| ) |
|
|
private |
RTT::os::MainThread::~MainThread |
( |
| ) |
|
|
virtual |
unsigned RTT::os::MainThread::getCpuAffinity |
( |
| ) |
const |
|
virtual |
int RTT::os::MainThread::getMaxOverrun |
( |
| ) |
const |
|
virtual |
const char * RTT::os::MainThread::getName |
( |
| ) |
const |
|
virtual |
Seconds RTT::os::MainThread::getPeriod |
( |
| ) |
const |
|
virtual |
nsecs RTT::os::MainThread::getPeriodNS |
( |
| ) |
const |
|
virtual |
unsigned int RTT::os::MainThread::getPid |
( |
| ) |
const |
|
virtual |
Returns the Process or Thread ID of this thread, as assigned by the Operating System. This function tries to return the Thread ID, if the OS supports it, otherwise it returns the process ID. If that is not available either, zero is returned. On Linux systems for example, the Thread ID of the main thread is equal to the Process ID. The Thread ID of every newly created thread is different from the Process ID (and unique).
Implements RTT::os::ThreadInterface.
Definition at line 109 of file MainThread.cpp.
int RTT::os::MainThread::getPriority |
( |
| ) |
const |
|
virtual |
int RTT::os::MainThread::getScheduler |
( |
| ) |
const |
|
virtual |
const RTOS_TASK * RTT::os::MainThread::getTask |
( |
| ) |
const |
|
virtual |
Return an object which represents the main thread. Only after this call, OS calls may be done.
Definition at line 58 of file MainThread.cpp.
bool RTT::os::MainThread::isActive |
( |
| ) |
const |
|
virtual |
bool RTT::os::MainThread::isRunning |
( |
| ) |
const |
|
virtual |
void RTT::os::MainThread::Release |
( |
| ) |
|
|
static |
This is called to cleanup the main thread. After this call, no OS calls may be done.
Definition at line 66 of file MainThread.cpp.
void RTT::os::MainThread::setMaxOverrun |
( |
int |
m | ) |
|
|
virtual |
bool RTT::os::MainThread::setPeriod |
( |
Seconds |
period | ) |
|
|
virtual |
bool RTT::os::MainThread::setPriority |
( |
int |
priority | ) |
|
|
virtual |
bool RTT::os::MainThread::setScheduler |
( |
int |
sched_type | ) |
|
|
virtual |
Change the scheduler policy in which this thread runs.
- Parameters
-
sched_type | An OS-specific value which selects a scheduler. Orocos requires that these two values are available:
- ORO_SCHED_RT: Hint the OS that this thread should be scheduled as a priority or real-time process.
- ORO_SCHED_OTHER: Hint the OS that this thread should not be scheduled as a priority or real-time process.
|
Your OS can in addition provide other sched_type's which map more naturally to the schedulers present. If your OS does not make a distinction between real-time and other, both values may map to the same scheduler type.
- Returns
- true if the change could be made.
Implements RTT::os::ThreadInterface.
Definition at line 88 of file MainThread.cpp.
void RTT::os::MainThread::setWaitPeriodPolicy |
( |
int |
p | ) |
|
|
virtual |
Set the wait policy of a periodic thread
- Parameters
-
The | wait policy can be ORO_WAIT_ABS (absolute wait) and ORO_WAIT_REL (relative wait, with respect to current time) |
Implements RTT::os::ThreadInterface.
Definition at line 133 of file MainThread.cpp.
bool RTT::os::MainThread::start |
( |
| ) |
|
|
virtual |
bool RTT::os::MainThread::stop |
( |
| ) |
|
|
virtual |
unsigned int RTT::os::MainThread::threadNumber |
( |
| ) |
const |
void RTT::os::MainThread::yield |
( |
| ) |
|
|
virtual |
We use a shared_ptr such that under exception conditions, the program is still cleaned up.
Definition at line 60 of file MainThread.hpp.
The documentation for this class was generated from the following files: