Other Parts Discussed in Thread: SYSBIOS
Goodmorning,
I write you since I need to port a linux application that uses POSIX threads into RTOS system. I have teh following doubt:
- In am335x_app_bbbam335x.cfg as indicated by
, I added the following:
/* Load the posix package */
var Settings = xdc.useModule('ti.posix.tirtos.Settings');
Settings.enableMutexPriority = true;
besides I had to change Task.enableIdleTask = true; otherwise I got an error, is it correct? - In Linux, I used clock_nanosleep(&ts, NULL); where ts is a timespec staruct. In RTOS implementation of POSIX do I have to use sleep(int usec) contained in unistd.h?
- In Linux, I used clock_gettime(CLOCK_MONOTONIC, &ts); I can use it in RTOS implementation, right? Do I have only to call at the in the initialization clock_settime(CLOCK_REALTIME, &ts); to set the time to 0?
- Despite having included
#include <pthread.h>
#include <sys/types.h>
inside the pthread.h file many function were excluded because of some ifdef. To avoid this problem, I had to define some constant _POSIX_THREADS and _POSIX_THREAD_PRIORITY_SCHEDULING ,as shown below. Is it normal?
- Can RTOS Task and POSIX thread coexist inside the same program?
Thank you for the assistance.
Regards,
Davide Brunelli
