27 typedef enum{attached,starting,active,detached} thread_states;
110 void *(*user_thread_function)(
void *param);
152 std::string thread_id;
195 void set_id(
const std::string&
id);
223 CThread(
const std::string&
id);
267 void attach(
void *(*user_thread_function)(
void *param),
void *param);
static void * thread_function(void *param)
Internal thread function.
Implementation of a parallel thread of execution.
std::string get_id(void)
Function to get the thread identifier.
Implementation of a mutual exclusion mechanism.
void attach(void *(*user_thread_function)(void *param), void *param)
Function to attach the user function of the thread.
virtual ~CThread()
Destructor.
int get_state(void)
Function to retrieve the state of the thread.
void end(void)
Function to request the end of the execution of the thread.
void detach(void)
Function to remove the assigned user function.
void set_id(const std::string &id)
Function to set the thread identifier.
void kill(void)
Function to immediatelly terminate the execution of the thread.
void start(void)
Function to start the execution of the thread.
CThread(const std::string &id)
Constructor.