FreeRTOS console and io devices support for compile

git-svn-id: svn://db.shs.com.ru/pip@688 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2019-02-06 13:04:25 +00:00
parent 30973842d1
commit 283da5b602
17 changed files with 185 additions and 63 deletions

View File

@@ -40,11 +40,6 @@ __THREAD_FUNC_RET__ thread_function_once(void * t) {PIThread::__thread_func_once
#define REGISTER_THREAD(t) __PIThreadCollection::instance()->registerThread(t)
#define UNREGISTER_THREAD(t) __PIThreadCollection::instance()->unregisterThread(t)
#ifdef FREERTOS
# define PTHREAD_MIN_MSLEEP 10.
#else
# define PTHREAD_MIN_MSLEEP 1.
#endif
/*! \class PIThread
* \brief Thread class

View File

@@ -29,6 +29,12 @@
#include "pimutex.h"
#include "piobject.h"
#ifdef FREERTOS
# define PTHREAD_MIN_MSLEEP 10.
#else
# define PTHREAD_MIN_MSLEEP 1.
#endif
class PIThread;
class PIP_EXPORT __PIThreadCollection {

View File

@@ -368,8 +368,10 @@ _PITimerImp_Pool::_PITimerImp_Pool(): _PITimerImp_Thread() {
_PITimerImp_Pool::Pool::Pool(): PIThread() {
setName("__S__PITimerImp_Pool::Pool");
needLockRun(true);
#ifndef FREERTOS
timers.reserve(64);
start(2);
#endif
start(PTHREAD_MIN_MSLEEP);
}