47 boost::shared_ptr<ThreadInterface> MainThread::mt;
50 MainThread::MainThread() {
virtual RTOS_TASK * getTask()
Get the RTOS_TASK pointer.
int rtos_task_get_priority(const RTOS_TASK *task)
Return the priority of a thread.
virtual bool isRunning() const
Returns always true.
double Seconds
Seconds are stored as a double precision float.
static ThreadInterface * Instance()
Return an object which represents the main thread.
unsigned int rtos_task_get_pid(const RTOS_TASK *task)
Returns the process ID the OS gave to the task task.
virtual bool isActive() const
Returns always true.
INTERNAL_QUAL int rtos_task_delete_main(RTOS_TASK *main_task)
Cleanup the main thread.
int rtos_task_set_scheduler(RTOS_TASK *t, int sched_type)
Set the scheduler of a given task t to a the type sched_type.
virtual const char * getName() const
Returns "main".
virtual bool stop()
Always fails.
unsigned rtos_task_get_cpu_affinity(const RTOS_TASK *task)
Return the cpu affinity of a thread.
virtual unsigned int getPid() const
Returns the Process or Thread ID of this thread, as assigned by the Operating System.
virtual unsigned getCpuAffinity() const
virtual bool setPriority(int priority)
Set the priority of this Thread.
A thread which is being run.
This file has all the (periodic) thread specific interfaces.
static void Release()
This is called to cleanup the main thread.
virtual int getMaxOverrun() const
void rtos_task_set_wait_period_policy(RTOS_TASK *task, int policy)
Set the wait policy of a thread.
virtual int getScheduler() const
Get the scheduler policy in which this thread runs.
int rtos_task_set_priority(RTOS_TASK *task, int priority)
Set the priority of a thread.
virtual int getPriority() const
The priority of this Thread.
virtual bool setScheduler(int sched_type)
Change the scheduler policy in which this thread runs.
virtual Seconds getPeriod() const
Returns zero.
virtual void setWaitPeriodPolicy(int p)
Set the wait policy of a periodic thread.
INTERNAL_QUAL void rtos_task_yield(RTOS_TASK *)
Yields the current thread.
unsigned int threadNumber() const
Returns zero, the number of the main() thread.
virtual void setMaxOverrun(int m)
virtual bool start()
Always fails.
virtual nsecs getPeriodNS() const
Returns zero.
virtual void yield()
Yields (put to the back of the scheduler queue) the calling thread.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
INTERNAL_QUAL int rtos_task_create_main(RTOS_TASK *main_task)
Initialise the main thread.
virtual bool setPeriod(Seconds period)
Returns always false.
long long nsecs
nanoseconds as a signed long long.
A class which represents the main() thread.
int rtos_task_get_scheduler(const RTOS_TASK *t)
Returns the current scheduler set for task t.