pthread patch, need test
git-svn-id: svn://db.shs.com.ru/pip@887 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -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<T>::size() ? PIDeque<T>::size() : maxCount;
|
||||
size_t otherRemainingCapacity = other.max_size - static_cast<PIDeque<T>>(other).size();
|
||||
size_t otherRemainingCapacity = other.max_size - static_cast<PIDeque<T> >(other).size();
|
||||
if (count > otherRemainingCapacity) count = otherRemainingCapacity;
|
||||
for (size_t i = 0; i < count; ++i) other.push_back(PIDeque<T>::take_front());
|
||||
other.mutex.unlock();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user