38 #ifndef ORO_THREAD_HPP 39 #define ORO_THREAD_HPP 42 #include "../rtt-config.h" 126 Thread(
int scheduler,
int priority,
double period,
unsigned cpu_affinity,
127 const std::string & name);
138 static void setStackSize(
unsigned int ssize);
145 static void setLockTimeoutNoPeriod(
double timeout_in_s);
153 static void setLockTimeoutPeriodFactor(
double factor);
156 virtual bool start();
164 void setStopTimeout(
Seconds s);
172 Seconds getStopTimeout()
const;
191 void getPeriod(
secs& s,
nsecs& ns)
const;
193 virtual Seconds getPeriod()
const;
195 virtual nsecs getPeriodNS()
const;
197 virtual bool isPeriodic()
const;
199 virtual bool isRunning()
const;
201 virtual bool isActive()
const;
203 virtual const char* getName()
const;
215 virtual bool setScheduler(
int sched_type);
217 virtual int getScheduler()
const;
219 virtual bool setPriority(
int priority);
221 virtual int getPriority()
const;
223 virtual unsigned int getPid()
const;
230 virtual bool setCpuAffinity(
unsigned cpu_affinity);
235 virtual unsigned getCpuAffinity()
const;
237 virtual void yield();
239 virtual void setMaxOverrun(
int m);
241 virtual int getMaxOverrun()
const;
243 virtual void setWaitPeriodPolicy(
int p);
253 void emergencyStop();
268 virtual bool breakLoop();
273 virtual bool initialize();
278 virtual void finalize();
282 void setup(
int _priority,
unsigned cpu_affinity,
const std::string& name);
289 static unsigned int default_stack_size;
294 static double lock_timeout_no_period_in_s;
299 static double lock_timeout_period_factor;
358 #ifdef OROPKG_OS_THREAD_SCOPE
double Seconds
Seconds are stored as a double precision float.
A Thread object executes user code in its own thread.
long secs
seconds as a signed long.
void * thread_function(void *t)
virtual RTOS_TASK * getTask()
Get the RTOS_TASK pointer.
A thread which is being run.
virtual const RTOS_TASK * getTask() const
const version of the above.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
An object oriented wrapper around a recursive mutex.
long long nsecs
nanoseconds as a signed long long.
A class representing a Digital Output device which can read or write a maximum of 32 bits at once...
struct timespec TIME_SPEC