rendered paste body-- thread.h --
static void * RunTrigger (void *);
class CThread {
public:
CThread (void);
~CThread (void);
int ThreadStart (void);
protected:
virtual void * MyRun (void *) = 0;
private:
pthread_t * ThreadId;
};
-- end thread.h --
-- thread.cpp --
#include "config.h"
#include "thread.h"
CThread::CThread (void) {
CThread::ThreadId = NULL;
}
int CThread::ThreadStart (void) {
int j = 0;
j = pthread_create (CThread::ThreadId, NULL, RunTrigger, NULL);
}
static void * RunTrigger (void *) {
CThread::MyRun (NULL);
return NULL;
}
-- end thread.cpp --