From 9b2be3333b8ac00bc1c3eb6f10b567d9bf0e9aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Wed, 26 Feb 2020 13:07:05 +0000 Subject: [PATCH] pthread patch, need test git-svn-id: svn://db.shs.com.ru/pip@887 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src_main/concurrent/piblockingdequeue.h | 6 +----- src_main/piversion.h | 2 +- src_main/thread/pithread.cpp | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src_main/concurrent/piblockingdequeue.h b/src_main/concurrent/piblockingdequeue.h index 98abb021..3396e5a5 100644 --- a/src_main/concurrent/piblockingdequeue.h +++ b/src_main/concurrent/piblockingdequeue.h @@ -1,7 +1,3 @@ -// -// Created by fomenko on 20.09.2019. -// - #ifndef PIP_TESTS_PIBLOCKINGDEQUEUE_H #define PIP_TESTS_PIBLOCKINGDEQUEUE_H @@ -187,7 +183,7 @@ public: mutex.lock(); other.mutex.lock(); size_t count = maxCount > PIDeque::size() ? PIDeque::size() : maxCount; - size_t otherRemainingCapacity = other.max_size - static_cast>(other).size(); + size_t otherRemainingCapacity = other.max_size - static_cast >(other).size(); if (count > otherRemainingCapacity) count = otherRemainingCapacity; for (size_t i = 0; i < count; ++i) other.push_back(PIDeque::take_front()); other.mutex.unlock(); diff --git a/src_main/piversion.h b/src_main/piversion.h index 9aa46535..2d9ef1b6 100644 --- a/src_main/piversion.h +++ b/src_main/piversion.h @@ -3,7 +3,7 @@ #define PIP_VERSION_MAJOR 1 #define PIP_VERSION_MINOR 12 -#define PIP_VERSION_REVISION 0 +#define PIP_VERSION_REVISION 1 #define PIP_VERSION_SUFFIX "_alpha" #endif // PIVERSION_H diff --git a/src_main/thread/pithread.cpp b/src_main/thread/pithread.cpp index f312397b..66978ba1 100755 --- a/src_main/thread/pithread.cpp +++ b/src_main/thread/pithread.cpp @@ -440,7 +440,7 @@ void PIThread::_beginThread() { #ifndef WINDOWS # if !defined(ANDROID) && !defined(FREERTOS) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, 0); - pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0); + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, 0); # endif #else //__PISetTimerResolution();