Open Lighting Architecture  0.9.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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  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  ConditionVariable
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.
bool SetSchedParam (pthread_t thread, int policy, const struct sched_param &param)
 Wraps pthread_setschedparam().

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.