RDK Documentation (Open Sourced RDK Components)

Description

Data Structures

class  Element
 
class  producer
 
class  consumer
 

Macros

#define CCEC_OSAL_NAMESPACE
 
#define CCEC_OSAL_BEGIN_NAMESPACE   namespace CCEC_OSAL {
 
#define CCEC_OSAL_END_NAMESPACE   }
 

Functions

int main ()
 
 CCEC_OSAL::ConditionVariable::~ConditionVariable (void)
 Destructor. Destroys the ConditionVariable object. More...
 
void CCEC_OSAL::ConditionVariable::set (void)
 sets the condition. Sets the condition assosiated with the ConditionVariable object. More...
 
void CCEC_OSAL::ConditionVariable::reset (void)
 resets the condition. Resets the condition assosiated with the ConditionVariable object to default (false). More...
 
bool CCEC_OSAL::ConditionVariable::isSet (void)
 Checks the status of the condition. Returns the status of the condition associated. Could be true/false. More...
 
void CCEC_OSAL::ConditionVariable::wait (void)
 Wait until the conditional variable is signalled. Causes the current thread to wait until it is signalled or interrupted. Calling thread will wait undefinetly until some other thread signals the ConditionVariable by calling notify/notifyAll.
 
long CCEC_OSAL::ConditionVariable::wait (long timeout)
 Wait until the conditional variable is signalled. Causes the current thread to wait until it is signalled or interrupted . Calling thread will wait undefinetly until some other thread signals the ConditionVariable by calling notify/notifyAll.
 
void CCEC_OSAL::ConditionVariable::notify (void)
 
void CCEC_OSAL::ConditionVariable::notifyAll (void)
 
void * CCEC_OSAL::ConditionVariable::getNativeHandle (void)
 
 CCEC_OSAL::Mutex::Mutex (void)
 Constructor. Creates Mutex object. More...
 
MutexCCEC_OSAL::Mutex::operator= (const Mutex &)
 
 CCEC_OSAL::Mutex::~Mutex (void)
 Destructor Destroys the Mutex object. More...
 
void CCEC_OSAL::Mutex::lock (void)
 Locks the given mutex. More...
 
void CCEC_OSAL::Mutex::unlock (void)
 Unlocks the given mutex. More...
 
void * CCEC_OSAL::Mutex::getNativeHandle (void)
 Retrieves handle to the underlying native mutex implementation. More...
 
 CCEC_OSAL::Thread::Thread (Runnable &target)
 Constructor. More...
 

Variables

static EventQueue< Element * > * intQueue
 

- Name of the thread context.

Constructor

Allocates a new Thread object

Parameters
target- Object implementes Runnable interface.
static void * CCEC_OSAL::Thread::CEntry (void *arg)
 Destructor. More...
 
 CCEC_OSAL::Thread::Thread (Runnable &target, const int8_t *name)
 Destructor. More...
 
virtual CCEC_OSAL::Thread::~Thread (void)
 Destructor. More...
 
void CCEC_OSAL::Thread::run (void)
 Executes the run() method of runnable object. More...
 
void CCEC_OSAL::Thread::start (void)
 Starts excecution of the thread. More...
 
void CCEC_OSAL::Thread::detach (void)
 Detaches the thread. More...
 

Data Structure Documentation

◆ Element

class Element

Definition at line 39 of file test_EventQueue.cpp.

Collaboration diagram for Element:
Collaboration graph

Public Member Functions

 Element (int i)
 

Data Fields

int value
 

◆ producer

class producer

Definition at line 50 of file test_EventQueue.cpp.

Inheritance diagram for producer:
Inheritance graph
Collaboration diagram for producer:
Collaboration graph

Private Member Functions

void run (void)
 

Additional Inherited Members

◆ consumer

class consumer

Definition at line 61 of file test_EventQueue.cpp.

Inheritance diagram for consumer:
Inheritance graph
Collaboration diagram for consumer:
Collaboration graph

Private Member Functions

void run (void)
 

Additional Inherited Members

Function Documentation

◆ ~ConditionVariable()

ConditionVariable::~ConditionVariable ( void  )

Destructor. Destroys the ConditionVariable object.

Definition at line 51 of file ConditionVariable.cpp.

◆ set()

void ConditionVariable::set ( void  )

sets the condition. Sets the condition assosiated with the ConditionVariable object.

Definition at line 61 of file ConditionVariable.cpp.

◆ reset()

void ConditionVariable::reset ( void  )

resets the condition. Resets the condition assosiated with the ConditionVariable object to default (false).

Definition at line 68 of file ConditionVariable.cpp.

◆ isSet()

bool ConditionVariable::isSet ( void  )

Checks the status of the condition. Returns the status of the condition associated. Could be true/false.

Returns
- boolean value of the associated condition.

Definition at line 75 of file ConditionVariable.cpp.

◆ Mutex()

CCEC_OSAL_BEGIN_NAMESPACE Mutex::Mutex ( void  )

Constructor. Creates Mutex object.

Definition at line 39 of file Mutex.cpp.

◆ ~Mutex()

Mutex::~Mutex ( void  )

Destructor Destroys the Mutex object.

Definition at line 65 of file Mutex.cpp.

◆ lock()

void Mutex::lock ( void  )

Locks the given mutex.

Calling thread will acquire the mutex lock if available and will immediately return. Subsequent call by other threads before current thread releasing the mutex will result in those threads to block.

Note
Current thread can call lock() for same object multiple times before releasing the mutex. But for releasing the lock to other threads, same number of unlock calls shall be made by the locking thread.

Definition at line 73 of file Mutex.cpp.

◆ unlock()

void Mutex::unlock ( void  )

Unlocks the given mutex.

Called by a thread which already acquired lock to release the lock acquired. If there are other threads waiting on the lock, one of those waiting threads will be able to acquire the lock released and will come out of wait state.

Definition at line 78 of file Mutex.cpp.

◆ getNativeHandle()

void * Mutex::getNativeHandle ( void  )

Retrieves handle to the underlying native mutex implementation.

Definition at line 83 of file Mutex.cpp.

◆ CEntry()

CCEC_OSAL_BEGIN_NAMESPACE void * Thread::CEntry ( void *  arg)
staticprivate

Destructor.

Destroys the Thread object

Definition at line 38 of file Thread.cpp.

◆ Thread() [1/2]

Thread::Thread ( Runnable target)

Constructor.

Allocates a new Thread object

Parameters
target- Object implements Runnable interface.

Definition at line 45 of file Thread.cpp.

◆ Thread() [2/2]

Thread::Thread ( Runnable target,
const int8_t *  name 
)

Destructor.

Destroys the Thread object

Definition at line 49 of file Thread.cpp.

◆ ~Thread()

Thread::~Thread ( void  )
virtual

Destructor.

Destroys the Thread object

Definition at line 53 of file Thread.cpp.

◆ run()

void Thread::run ( void  )
virtual

Executes the run() method of runnable object.

If this object is created by passing reference to a runnable object, that object's run() will be executed, otherwise this method does nothing and returns.

Implements CCEC_OSAL::Runnable.

Definition at line 57 of file Thread.cpp.

◆ start()

void Thread::start ( void  )

Starts excecution of the thread.

Causes this thread to begin execution;This calls the run method of this thread. The result is that two threads are running concurrently: the current thread (which returns from the call to the start method) and the other thread (which executes its run method).

Definition at line 62 of file Thread.cpp.

◆ detach()

void Thread::detach ( void  )

Detaches the thread.

Detaches the thread.

Definition at line 83 of file Thread.cpp.