Public Member Functions | |
virtual | ~CSemaphoreExample () |
void | StartThreads () |
void | PrintMessage () |
Static Public Member Functions | |
static CSemaphoreExample * | NewL () |
static TInt | ReadThreadFuncL (TAny *aPtr) |
static TInt | WriteThreadFuncL (TAny *aPtr) |
Protected Member Functions | |
void | ConstructL () |
This class is the main class which starts the application, and starts two threads to read to/write from a database.
Definition at line 27 of file SemaphoreExample.h.
CSemaphoreExample::~CSemaphoreExample | ( | ) | [virtual] |
Destructor
Definition at line 23 of file SemaphoreExample.cpp.
CSemaphoreExample * CSemaphoreExample::NewL | ( | ) | [static] |
Definition at line 33 of file SemaphoreExample.cpp.
TInt CSemaphoreExample::ReadThreadFuncL | ( | TAny * | aPtr | ) | [static] |
This function is called when iReadThread is resumed. It creates a cleanup stack and calls ReadDbFunc().
Definition at line 161 of file SemaphoreExample.cpp.
TInt CSemaphoreExample::WriteThreadFuncL | ( | TAny * | aPtr | ) | [static] |
This function is called when iWriteThread is resumed. It creates a cleanup stack and calls WriteDbFunc().
Definition at line 208 of file SemaphoreExample.cpp.
void CSemaphoreExample::StartThreads | ( | ) |
Starts iReadThread and iWriteThread.
Definition at line 70 of file SemaphoreExample.cpp.
void CSemaphoreExample::ConstructL | ( | ) | [protected] |
Creates and resumes two threads, one for reading from the database and other for writing into the database. Prints messages to console depending on whether the USE_SEMAPHORE macro is enabled or disabled.
Definition at line 46 of file SemaphoreExample.cpp.