31 #define DEFAULT_STACK_SIZE 0x4000 41 m_description(description),
110 rt_make_hard_real_time();
115 rt_make_soft_real_time();
149 m_rt_start_sync = rt_typed_sem_init(
size_t(
this), 2, CNT_SEM | PRIO_Q);
182 if (self->m_rt_start_sync == NULL)
186 PRINTF(
"ERROR: NULL thread start barrier!\n");
190 self->m_rt_task = rt_task_init(
getpid() + pthread_self_rt(),
abs(self->m_priority),
192 if (self->m_rt_task == NULL)
194 PRINTF(
"ERROR: Cannot initialize LXRT task %lu!\n", self->m_thread_id);
195 PRINTF(
" Probably another thread with the same name already exists.\n");
198 rt_sem_wait_barrier(self->m_rt_start_sync);
202 if (self->m_priority < 0)
204 rt_make_hard_real_time();
205 if (!rt_is_hard_real_time(rt_buddy()))
207 PRINTF(
"ERROR: Setting thread %lu to hard real-time failed!\n", self->m_thread_id);
220 rt_sem_wait_barrier(self->m_rt_start_sync);
222 self->m_thread->runThread();
226 rt_make_soft_real_time();
ICL_CORE_OS_IMPL_NS::ThreadId ThreadId
virtual bool setHardRealtime(bool hard_realtime)
TimeSpan abs(const TimeSpan &span)
virtual icl_core::ThreadPriority priority() const
ThreadPriority m_priority
virtual bool isHardRealtime() const
virtual icl_core::ThreadId threadId() const
Contains a system independet PRINTF macro.
#define DEFAULT_STACK_SIZE
Contains logging definitions for the icl_core_thread library.
virtual bool executesHardRealtime() const
ThreadImplLxrt38(Thread *thread, const icl_core::String &description, icl_core::ThreadPriority priority)
static void * runThread(void *arg)
virtual ~ThreadImplLxrt38()
Contains global LXRT functions.
virtual bool setPriority(icl_core::ThreadPriority priority)
Contains icl_core::thread::Thread.
Contains icl_core::thread::ThreadImpl for RTAI/LXRT 3.8.