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 41 of file SemaphoreExample.h.
CSemaphoreExample::~CSemaphoreExample | ( | ) | [virtual] |
Destructor
Definition at line 39 of file SemaphoreExample.cpp.
CSemaphoreExample * CSemaphoreExample::NewL | ( | ) | [static] |
Definition at line 49 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 177 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 224 of file SemaphoreExample.cpp.
void CSemaphoreExample::StartThreads | ( | ) |
Starts iReadThread and iWriteThread.
Definition at line 86 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 62 of file SemaphoreExample.cpp.