RTT::OS Namespace Reference

OS Abstractions such as Mutexes, Semaphores and Threads. More...


Classes

class  AtomicInt
 C++ abstraction of atomic integer operations. More...
class  MainThread
 A class which represents the main() thread. More...
class  MutexInterface
 An interface to a Mutex. More...
class  Mutex
 An object oriented wrapper around a non recursive mutex. More...
class  MutexRecursive
 An object oriented wrapper around a recursive mutex. More...
class  MutexLock
 MutexLock is a scope based Monitor, protecting critical sections with a Mutex object through locking and unlocking it. More...
class  MutexTryLock
 A MutexTryLock tries to lock an Mutex object on construction and if successful, unlocks it on destruction of the MutexTryLock. More...
class  local_allocator
 A simple local allocator which keeps a small pool which you can grow manually with grow(). More...
class  PeriodicThread
 A PeriodicThread executes its step() method (or a RunnableInterface ) periodically. More...
struct  rt_list
 Implements a list with real-time insertion/removal of elements. More...
class  RunnableInterface
 A class for running a certain piece of code in a thread. More...
class  Semaphore
 An object oriented wrapper around a counting semaphore. More...
class  SingleThread
 This Thread abstraction class represents a single-shot thread which can be started many times. More...
class  StartStopManager
 This manager starts and stops all globally registered start/stop functions, without a particular order. More...
struct  InitFunction
 Use this to register a global init function to the StartStopManager. More...
struct  CleanupFunction
 Use this to register a global cleanup function to the StartStopManager. More...
class  ThreadInterface
 A thread which is being run (or runs a RunnableInterface). More...

Typedefs

typedef double Seconds
typedef long secs
typedef long msecs
typedef long usecs
typedef long long nsecs

Functions

template<class T , class V , class W >
bool CAS (volatile T *addr, const V &expected, const W &value)
 Compare And Swap.
template<class T , class A , class A2 >
bool operator== (const local_allocator< T, A > &, const local_allocator< T, A2 > &)
template<class T , class A , class A2 >
bool operator!= (const local_allocator< T, A > &, const local_allocator< T, A2 > &)
template<class T , class A >
bool operator== (const local_allocator< T, A > &, const local_allocator< T, A > &)
template<class T , class A >
bool operator!= (const local_allocator< T, A > &, const local_allocator< T, A > &)
bool CheckScheduler (int &sched_type)
 Check if the scheduler is a valid type in the current process and adapt to a valid value.
bool CheckPriority (int &sched_type, int &priority)
 Check if the scheduler type and priority match and adapt to a valid value.
msecs secs_to_msecs (const secs s)
usecs secs_to_usecs (const secs s)
nsecs secs_to_nsecs (const secs s)
usecs msecs_to_usecs (const msecs ms)
nsecs msecs_to_nsecs (const msecs ms)
nsecs usecs_to_nsecs (const usecs us)
nsecs Seconds_to_nsecs (const Seconds s)
Seconds nsecs_to_Seconds (const nsecs ns)

Variables

AtomicInt threads
 The number of threads in addition to the main() thread.
const int LowestPriority
 An integer denoting the lowest priority of the selected OS.
const int HighestPriority
 An integer denoting the highest priority of the selected OS.
const int IncreasePriority
 An interval to be added 'n' times to LowestPriority to get an 'n' times higher priority.
const long MSECS_IN_SECS = 1000
const long USECS_IN_SECS = 1000 * MSECS_IN_SECS
const long NSECS_IN_SECS = 1000 * USECS_IN_SECS
const long USECS_IN_MSECS = 1000
const long NSECS_IN_MSECS = 1000 * USECS_IN_MSECS
const long NSECS_IN_USECS = 1000


Detailed Description

OS Abstractions such as Mutexes, Semaphores and Threads.

It is meant to group all packages which provide OS abstraction classes and functions in a realtime system. Examples are Threads, Mutexes and standard libraries.


Function Documentation

template<class T , class V , class W >
bool RTT::OS::CAS ( volatile T *  addr,
const V &  expected,
const W &  value 
) [inline]

bool RTT::OS::CheckPriority ( int &  sched_type,
int &  priority 
)

Check if the scheduler type and priority match and adapt to a valid value.

If sched_type is unknown a default is choosen. If priority is invalid within sched_type, a default is choosen.

Returns:
true if the arguments made sense, false if a correction was applied.

bool RTT::OS::CheckScheduler ( int &  sched_type  ) 

Check if the scheduler is a valid type in the current process and adapt to a valid value.

Returns:
true if sched_type made sense, false if a correction was applied.


Variable Documentation

The number of threads in addition to the main() thread.

The main thread is thread zero (0). threads is increased by one for each PeriodicThread or SingleThread object created and is never decreased.


Generated on Tue Aug 25 14:17:26 2009 for Orocos Real-Time Toolkit by  doxygen 1.5.8