add FreeRTOS support for PIThread PIMutex PIConditionVariable

This commit is contained in:
Andrey
2022-01-21 14:15:42 +03:00
parent 7403ee67be
commit 8296e9a32b
9 changed files with 173 additions and 77 deletions

View File

@@ -18,10 +18,10 @@
*/
#include "piobject.h"
#include "pisysteminfo.h"
#include "pithread.h"
#include "piconditionvar.h"
#ifndef MICRO_PIP
# include "pisysteminfo.h"
# include "pifile.h"
#endif
@@ -589,6 +589,7 @@ void PIObject::dump(const PIString & line_prefix) const {
}
#ifndef MICRO_PIP
void dumpApplication() {
PIMutexLocker _ml(PIObject::mutexObjects());
//printf("dump application ...\n");
@@ -615,7 +616,6 @@ void dumpApplication() {
}
#ifndef MICRO_PIP
bool dumpApplicationToFile(const PIString & path) {
PIFile f(path + "_tmp");
f.setName("__S__DumpFile");

View File

@@ -37,11 +37,13 @@
typedef void (*Handler)(void * );
class PIP_EXPORT PIObject {
#ifndef MICRO_PIP
friend class PIObjectManager;
friend void dumpApplication();
friend class PIIntrospection;
#endif
typedef PIObject __PIObject__;
typedef void __Parent__;
friend class PIIntrospection;
public:
NO_COPY_CLASS(PIObject)
@@ -539,8 +541,9 @@ private:
};
#ifndef MICRO_PIP
PIP_EXPORT void dumpApplication();
PIP_EXPORT bool dumpApplicationToFile(const PIString & path);
#endif
#endif // PIOBJECT_H

View File

@@ -19,8 +19,9 @@
#include "pivarianttypes.h"
#include "pipropertystorage.h"
#include "piiodevice.h"
#ifndef MICRO_PIP
# include "piiodevice.h"
#endif
int PIVariantTypes::Enum::selectedValue() const {
piForeachC (Enumerator & e, enum_list)
@@ -83,7 +84,7 @@ PIStringList PIVariantTypes::Enum::names() const {
#ifndef MICRO_PIP
PIVariantTypes::IODevice::IODevice() {
mode = PIIODevice::ReadWrite;
options = 0;
@@ -125,7 +126,7 @@ PIString PIVariantTypes::IODevice::toPICout() const {
s << ")";
return s;
}
#endif // MICRO_PIP