17.10.2013 - Adjusted for QNX, PIPeer release for Windows, Remote console

This commit is contained in:
peri4
2013-10-17 16:12:10 +04:00
parent 4b90f2818e
commit 0f1b528ac6
42 changed files with 585 additions and 171 deletions

View File

@@ -63,6 +63,7 @@ void piUSleep(int usecs) {
PIThread::PIThread(void * data, ThreadFunc func, bool startNow, int timer_delay): PIObject() {
piMonitor.threads++;
thread = 0;
data_ = data;
ret_func = func;
running = lockRun = false;
@@ -74,6 +75,7 @@ PIThread::PIThread(void * data, ThreadFunc func, bool startNow, int timer_delay)
PIThread::PIThread(bool startNow, int timer_delay): PIObject() {
piMonitor.threads++;
thread = 0;
ret_func = 0;
running = lockRun = false;
priority_ = piNormal;
@@ -84,7 +86,7 @@ PIThread::PIThread(bool startNow, int timer_delay): PIObject() {
PIThread::~PIThread() {
piMonitor.threads--;
if (!running) return;
if (!running || thread == 0) return;
#ifndef WINDOWS
pthread_cancel(thread);
#else