platformio_pre.py
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PIP_FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
|
||||
#include "pilibrary.h"
|
||||
#include "piincludes_p.h"
|
||||
@@ -110,4 +110,4 @@ void PILibrary::getLastError() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // PIP_FREERTOS
|
||||
#endif // MICRO_PIP
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifndef PILIBRARY_H
|
||||
#define PILIBRARY_H
|
||||
|
||||
#ifndef PIP_FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
|
||||
#include "pistring.h"
|
||||
|
||||
@@ -50,5 +50,5 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif // PIP_FREERTOS
|
||||
#endif // MICRO_PIP
|
||||
#endif // PILIBRARY_H
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PIP_FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
|
||||
#include "piplugin.h"
|
||||
#include "pifile.h"
|
||||
@@ -408,4 +408,4 @@ PIString PIPluginLoader::libExtension() {
|
||||
}
|
||||
|
||||
|
||||
#endif // PIP_FREERTOS
|
||||
#endif // MICRO_PIP
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifndef PIPLUGIN_H
|
||||
#define PIPLUGIN_H
|
||||
|
||||
#ifndef PIP_FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
|
||||
#include "pilibrary.h"
|
||||
#include "pistringlist.h"
|
||||
@@ -212,5 +212,5 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // PIP_FREERTOS
|
||||
#endif // MICRO_PIP
|
||||
#endif // PIPLUGIN_H
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PIP_FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
|
||||
#include "piincludes_p.h"
|
||||
#include "piprocess.h"
|
||||
@@ -290,5 +290,5 @@ PIString PIProcess::getEnvironmentVariable(const PIString & variable) {
|
||||
return PIString();
|
||||
}
|
||||
|
||||
#endif // PIP_FREERTOS
|
||||
#endif // MICRO_PIP
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifndef PIPROCESS_H
|
||||
#define PIPROCESS_H
|
||||
|
||||
#ifndef PIP_FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
|
||||
#include "pithread.h"
|
||||
#include "pifile.h"
|
||||
@@ -104,5 +104,5 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif // PIP_FREERTOS
|
||||
#endif // MICRO_PIP
|
||||
#endif // PIPROCESS_H
|
||||
|
||||
@@ -59,7 +59,7 @@ PISystemMonitor::ThreadStatsFixed::ThreadStatsFixed() {
|
||||
}
|
||||
|
||||
|
||||
#ifndef FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
PRIVATE_DEFINITION_START(PISystemMonitor)
|
||||
#ifndef WINDOWS
|
||||
# ifdef MAC_OS
|
||||
@@ -83,7 +83,7 @@ PRIVATE_DEFINITION_END(PISystemMonitor)
|
||||
PISystemMonitor::PISystemMonitor(): PIThread() {
|
||||
pID_ = cycle = 0;
|
||||
cpu_count = PISystemInfo::instance()->processorsCount;
|
||||
#ifndef FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
#ifndef WINDOWS
|
||||
# ifdef QNX
|
||||
page_size = 4096;
|
||||
@@ -104,7 +104,7 @@ PISystemMonitor::~PISystemMonitor() {
|
||||
}
|
||||
|
||||
|
||||
#ifndef FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
bool PISystemMonitor::startOnProcess(int pID, int interval_ms) {
|
||||
stop();
|
||||
pID_ = pID;
|
||||
@@ -134,7 +134,7 @@ bool PISystemMonitor::startOnProcess(int pID, int interval_ms) {
|
||||
|
||||
|
||||
bool PISystemMonitor::startOnSelf(int interval_ms) {
|
||||
#ifndef FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
bool ret = startOnProcess(PIProcess::currentPID(), interval_ms);
|
||||
cycle = -1;
|
||||
#else
|
||||
@@ -196,7 +196,7 @@ void PISystemMonitor::run() {
|
||||
//piCout << tbid.keys().toType<uint>();
|
||||
ProcessStats tstat;
|
||||
tstat.ID = pID_;
|
||||
#ifdef FREERTOS
|
||||
#ifdef MICRO_PIP
|
||||
piForeach (PIThread * t, tv)
|
||||
if (t->isPIObject())
|
||||
gatherThread(t->tid());
|
||||
@@ -357,7 +357,7 @@ void PISystemMonitor::run() {
|
||||
void PISystemMonitor::gatherThread(llong id) {
|
||||
PISystemMonitor::ThreadStats ts;
|
||||
ts.id = id;
|
||||
#ifdef FREERTOS
|
||||
#ifdef MICRO_PIP
|
||||
ts.name = tbid.value(id, "<PIThread>");
|
||||
#else
|
||||
ts.name = tbid.value(id, "<non-PIThread>");
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
PIString name;
|
||||
};
|
||||
|
||||
#ifndef FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
bool startOnProcess(int pID, int interval_ms = 1000);
|
||||
#endif
|
||||
bool startOnSelf(int interval_ms = 1000);
|
||||
@@ -106,7 +106,7 @@ private:
|
||||
PIMap<llong, PIString> tbid;
|
||||
mutable PIMutex stat_mutex;
|
||||
int pID_, page_size, cpu_count, cycle;
|
||||
#ifndef FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
PRIVATE_DECLARATION(PIP_EXPORT)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "pisystemtests.h"
|
||||
|
||||
#ifndef PIP_FREERTOS
|
||||
#ifndef MICRO_PIP
|
||||
# include "piconfig.h"
|
||||
#endif
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace PISystemTests {
|
||||
|
||||
|
||||
PISystemTests::PISystemTestReader::PISystemTestReader() {
|
||||
#if !defined(WINDOWS) && !defined(FREERTOS)
|
||||
#if !defined(WINDOWS) && !defined(MICRO_PIP)
|
||||
PIConfig conf(PIStringAscii("/etc/pip.conf"), PIIODevice::ReadOnly);
|
||||
time_resolution_ns = conf.getValue(PIStringAscii("time_resolution_ns"), 1).toLong();
|
||||
time_elapsed_ns = conf.getValue(PIStringAscii("time_elapsed_ns"), 0).toLong();
|
||||
|
||||
Reference in New Issue
Block a user