9.10.2011 - stable backup commit
This commit is contained in:
11
pithread.h
11
pithread.h
@@ -1,7 +1,6 @@
|
||||
#ifndef PITHREAD_H
|
||||
#define PITHREAD_H
|
||||
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include "pimutex.h"
|
||||
|
||||
@@ -33,7 +32,7 @@ public:
|
||||
bool start(int timer_delay = -1);
|
||||
bool startOnce();
|
||||
void stop(bool wait = false) {terminating = true; if (wait) waitForFinish();}
|
||||
void terminate() {kill(thread, SIGKILL); end(); running = false;}
|
||||
void terminate(bool hard = false);
|
||||
void setPriority(PIThread::Priority prior);
|
||||
PIThread::Priority priority() const {return priority_;}
|
||||
bool isRunning() const {return running;}
|
||||
@@ -55,10 +54,14 @@ protected:
|
||||
|
||||
volatile bool terminating, running, lockRun;
|
||||
int timer, policy;
|
||||
pthread_t thread;
|
||||
PIMutex mutex_;
|
||||
sched_param sparam;
|
||||
PIThread::Priority priority_;
|
||||
#ifndef WINDOWS
|
||||
pthread_t thread;
|
||||
sched_param sparam;
|
||||
#else
|
||||
void * thread;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user