Open Lighting Architecture  0.10.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Typedefs | Functions | Variables
ola::thread Namespace Reference

Detailed Description

Threads and syncronization mechanisms.

Classes

class  CallbackThread
 A thread which executes a Callback. More...
 
class  ConditionVariable
 
class  ConsumerThread
 
class  ExecutorInterface
 Defer execution of a callback. More...
 
class  ExecutorThread
 Enables callbacks to be executed in a separate thread. More...
 
class  Future
 
class  Future< void >
 
class  FutureImpl
 
class  FutureImpl< void >
 
class  Mutex
 
class  MutexLocker
 
class  PeriodicThread
 A thread which executes a Callback. More...
 
class  SchedulerInterface
 Allows Callbacks to be scheduled to run after a specified interval. More...
 
class  SchedulingExecutorInterface
 Combines the ExecutorInterface and the SchedulerInterface. More...
 
class  SignalThread
 
class  Thread
 
class  ThreadPool
 

Typedefs

typedef void * timeout_id
 A timeout handle which can later be used to cancel a timeout.
 
typedef pthread_t ThreadId
 

Functions

std::string PolicyToString (int policy)
 Convert a scheduling policy to a string. More...
 
bool SetSchedParam (pthread_t thread, int policy, const struct sched_param &param)
 Wraps pthread_setschedparam(). More...
 

Variables

static const timeout_id INVALID_TIMEOUT = NULL
 An invalid / uninitialized timeout_id.
 

Function Documentation

std::string ola::thread::PolicyToString ( int  policy)

Convert a scheduling policy to a string.

Parameters
policythe scheduling policy.
Returns
The name of the policy or "unknown".
bool ola::thread::SetSchedParam ( pthread_t  thread,
int  policy,
const struct sched_param &  param 
)

Wraps pthread_setschedparam().

Parameters
threadThe thread id.
policythe new policy.
paramthe scheduling parameters.
Returns
True if the call succeeded, false otherwise.