add initial RTOS support

now without io devices and console

git-svn-id: svn://db.shs.com.ru/pip@683 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2019-02-04 23:57:53 +00:00
parent b0285fd251
commit 79e17eb928
17 changed files with 303 additions and 218 deletions

View File

@@ -31,7 +31,7 @@
# include <sys/syscall.h>
# define gettid() syscall(SYS_gettid)
#endif
#if defined(MAC_OS) || defined(BLACKBERRY)
#if defined(MAC_OS) || defined(BLACKBERRY) || defined(FREERTOS)
# include <pthread.h>
#endif
__THREAD_FUNC_RET__ thread_function(void * t) {PIThread::__thread_func__(t); return 0;}
@@ -335,7 +335,8 @@ int PIThread::priority2System(PIThread::Priority p) {
void PIThread::setPriority(PIThread::Priority prior) {
priority_ = prior;
#ifndef FREERTOS // FreeRTOS can't change priority runtime
priority_ = prior;
#ifndef WINDOWS
if (!running_ || (PRIVATE->thread == 0)) return;
//piCout << "setPriority" << PRIVATE->thread;
@@ -354,6 +355,7 @@ void PIThread::setPriority(PIThread::Priority prior) {
if (!running_ || (PRIVATE->thread == 0)) return;
SetThreadPriority(PRIVATE->thread, priority2System(priority_));
#endif
#endif //FREERTOS
}