remove some ifdefs

This commit is contained in:
2026-08-12 15:12:36 +03:00
parent e2c0445c1b
commit 7af2b0bb07
4 changed files with 12 additions and 26 deletions
@@ -181,7 +181,6 @@ void PISystemMonitor::run() {
tbid.clear();
ProcessStats tstat;
tstat.ID = pID_;
# ifdef PIP_HAS_THREADS
__PIThreadCollection * pitc = __PIThreadCollection::instance();
pitc->lock();
PIVector<PIThread *> tv = pitc->threads();
@@ -319,7 +318,6 @@ void PISystemMonitor::run() {
PRIVATE->tm.reset();
# endif // WINDOWS
# endif // FREERTOS
# endif // PIP_HAS_THREADS
tstat.cpu_load_system = piClampf(tstat.cpu_load_system, 0.f, 100.f);
tstat.cpu_load_user = piClampf(tstat.cpu_load_user, 0.f, 100.f);
-2
View File
@@ -279,8 +279,6 @@ void PIBaseTransfer::received(PIByteArray data) {
return;
}
break;
#ifdef PIP_HAS_THREADS
#endif
case pt_Pause:
mutex_header.lock();
if (header.session_id == h.session_id) {
-8
View File
@@ -450,8 +450,6 @@ __THREAD_FUNC_RET__ thread_function_once(void * t) {
//! \return \c false если таймаут истёк
# ifdef PIP_HAS_THREADS
__PIThreadCollection * __PIThreadCollection::instance() {
return __PIThreadCollection_Initializer__::__instance__;
}
@@ -516,8 +514,6 @@ __PIThreadCollection_Initializer__::~__PIThreadCollection_Initializer__() {
}
}
# endif // PIP_HAS_THREADS
PRIVATE_DEFINITION_START(PIThread)
# if defined(WINDOWS)
@@ -1003,10 +999,8 @@ void PIThread::runOnce(PIObject * object, const char * handler, const PIString &
delete t;
return;
}
# ifdef PIP_HAS_THREADS
__PIThreadCollection::instance()->startedAuto(t);
CONNECT0(void, t, stopped, __PIThreadCollection::instance(), stoppedAuto);
# endif
t->startOnce();
}
@@ -1037,10 +1031,8 @@ void PIThread::runOnce(std::function<void()> func, const PIString & name) {
PIThread * t = new PIThread();
t->setName(name);
t->setSlot(std::move(func));
# ifdef PIP_HAS_THREADS
__PIThreadCollection::instance()->startedAuto(t);
CONNECT0(void, t, stopped, __PIThreadCollection::instance(), stoppedAuto);
# endif
t->startOnce();
}
-2
View File
@@ -97,9 +97,7 @@ typedef std::function<void(void *)> ThreadFunc;
//! проход без повторяющегося цикла обработки очереди.
class PIP_EXPORT PIThread: public PIObject {
PIOBJECT_SUBCLASS(PIThread, PIObject);
# ifdef PIP_HAS_THREADS
friend class PIIntrospectionThreads;
# endif
public:
NO_COPY_CLASS(PIThread);