git-svn-id: svn://db.shs.com.ru/pip@718 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2019-02-07 15:37:59 +00:00
parent 06150591fc
commit ba0ea759b8

View File

@@ -190,8 +190,10 @@ PIThread::~PIThread() {
#ifdef FREERTOS #ifdef FREERTOS
//void * ret(0); //void * ret(0);
piCout << "~PIThread" << PRIVATE->thread; piCout << "~PIThread" << PRIVATE->thread;
piCout << pthread_join(PRIVATE->thread, 0); //piCout << pthread_join(PRIVATE->thread, 0);
piCout << "FREERTOS can't join pthreads!"; piCout << "FreeRTOS can't join pthreads! waiting for stop";
stop(true);
piCout << "stopped!"
#else #else
#ifndef WINDOWS #ifndef WINDOWS
# ifdef ANDROID # ifdef ANDROID
@@ -292,14 +294,16 @@ bool PIThread::startOnce() {
void PIThread::terminate() { void PIThread::terminate() {
#ifdef FREERTOS
piCout << "FreeRTOS can't terminate pthreads! waiting for stop";
stop(true);
piCout << "stopped!"
#else
if (PRIVATE->thread == 0) return; if (PRIVATE->thread == 0) return;
UNREGISTER_THREAD(this); UNREGISTER_THREAD(this);
PIINTROSPECTION_UNREGISTER_THREAD(tid()); PIINTROSPECTION_UNREGISTER_THREAD(tid());
terminating = running_ = false; terminating = running_ = false;
tid_ = -1; tid_ = -1;
#ifdef FREERTOS
piCout << "FREERTOS can't terminate pthreads!";
#endif
//piCout << "terminate" << PRIVATE->thread; //piCout << "terminate" << PRIVATE->thread;
#ifndef WINDOWS #ifndef WINDOWS
# ifdef ANDROID # ifdef ANDROID
@@ -316,6 +320,7 @@ void PIThread::terminate() {
#endif #endif
PRIVATE->thread = 0; PRIVATE->thread = 0;
end(); end();
#endif
} }