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;
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);
359 #ifdef OROPKG_OS_THREAD_SCOPE
static unsigned int default_stack_size
void * thread_function(void *t)
virtual RTOS_TASK * getTask()
static double lock_timeout_period_factor
virtual const RTOS_TASK * getTask() const
static RTT_UNUSED bool setCpuAffinity(ThreadInterface *thread, const std::bitset< 16 > &cpu_affinity)
static double lock_timeout_no_period_in_s
static void yield(TaskContext *tc)
static std::bitset< 16 > getCpuAffinity(ThreadInterface *thread)
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
An object oriented wrapper around a recursive mutex.
struct timespec TIME_SPEC