PIP_NO_FILESYSTEM and PIP_NO_THREADS

This commit is contained in:
2026-03-29 12:22:35 +03:00
parent 15f90d9e17
commit a450235743
17 changed files with 55 additions and 33 deletions

View File

@@ -23,6 +23,7 @@
# define _WIN32_WINNT 0x0600
#endif
#ifndef PIP_NO_THREADS
#include "piconditionvar.h"
#include "piincludes_p.h"
#ifdef WINDOWS
@@ -179,3 +180,4 @@ void PIConditionVariable::notifyAll() {
pthread_cond_broadcast(&PRIVATE->nativeHandle);
#endif
}
#endif // PIP_NO_THREADS

View File

@@ -30,6 +30,7 @@
#include "pisystemtime.h"
#ifndef PIP_NO_THREADS
/**
* \brief A condition variable is an object able to block the calling thread until notified to resume.
*
@@ -121,5 +122,5 @@ private:
PRIVATE_DECLARATION(PIP_EXPORT)
};
#endif // PIP_NO_THREADS
#endif // PICONDITIONVAR_H

View File

@@ -107,6 +107,7 @@
//! \}
#ifndef PIP_NO_THREADS
#include "pimutex.h"
#include "piincludes_p.h"
@@ -228,3 +229,4 @@ void PIMutex::destroy() {
pthread_mutex_destroy(&(PRIVATE->mutex));
#endif
}
#endif // PIP_NO_THREADS

View File

@@ -29,6 +29,7 @@
#include "piinit.h"
#ifndef PIP_NO_THREADS
class PIP_EXPORT PIMutex {
public:
NO_COPY_CLASS(PIMutex);
@@ -85,5 +86,5 @@ private:
bool cond;
};
#endif // PIP_NO_THREADS
#endif // PIMUTEX_H

View File

@@ -17,6 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PIP_NO_THREADS
#include "pithread.h"
#include "piincludes_p.h"
@@ -1086,3 +1087,4 @@ bool PIThread::_waitForFinish(PISystemTime max_tm) {
#endif
return false;
}
#endif // PIP_NO_THREADS

View File

@@ -33,6 +33,7 @@
class PIThread;
#ifndef PIP_NO_THREADS
#ifndef MICRO_PIP
class PIIntrospectionThreads;
@@ -304,5 +305,5 @@ private:
void setThreadName();
};
#endif // PIP_NO_THREADS
#endif // PITHREAD_H

View File

@@ -17,6 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PIP_NO_THREADS
#include "pitimer.h"
#include "piconditionvar.h"
@@ -302,3 +303,4 @@ void PITimer::stop() {
thread->stop();
event.notifyAll();
}
#endif // PIP_NO_THREADS

View File

@@ -33,6 +33,7 @@
class PIThread;
#ifndef PIP_NO_THREADS
class PIP_EXPORT PITimer: public PIObject {
PIOBJECT_SUBCLASS(PITimer, PIObject);
@@ -209,5 +210,5 @@ protected:
PIConditionVariable event;
};
#endif // PIP_NO_THREADS
#endif // PITIMER_H