31 #define DEFAULT_STACK_SIZE 0x4000 41 m_description(description),
111 rt_make_hard_real_time();
116 rt_make_soft_real_time();
186 if (self->m_rt_start_sync == NULL)
190 PRINTF(
"ERROR: NULL thread start barrier!\n");
194 self->m_rt_task = rt_task_init(
getpid() + pthread_self_rt(),
abs(self->m_priority),
196 if (self->m_rt_task == NULL)
198 PRINTF(
"ERROR: Cannot initialize LXRT task %lu!\n", self->m_thread_id);
199 PRINTF(
" Probably another thread with the same name already exists.\n");
202 pthread_barrier_wait_rt(self->m_rt_start_sync);
206 if (self->m_priority < 0)
208 rt_make_hard_real_time();
209 if (!rt_is_hard_real_time(rt_buddy()))
211 PRINTF(
"ERROR: Setting thread %lu to hard real-time failed!\n", self->m_thread_id);
224 pthread_barrier_wait_rt(self->m_rt_start_sync);
226 self->m_thread->runThread();
230 rt_make_soft_real_time();
ICL_CORE_OS_IMPL_NS::ThreadId ThreadId
virtual bool setPriority(icl_core::ThreadPriority priority)
TimeSpan abs(const TimeSpan &span)
Contains icl_core::thread::ThreadImpl for RTAI/LXRT 3.5.
Contains a system independet PRINTF macro.
virtual ~ThreadImplLxrt35()
pthread_barrier_t * m_rt_start_sync
virtual bool isHardRealtime() const
ThreadPriority m_priority
Contains logging definitions for the icl_core_thread library.
virtual bool setHardRealtime(bool hard_realtime)
static void * runThread(void *arg)
Contains global LXRT functions.
virtual bool executesHardRealtime() const
Contains icl_core::thread::Thread.
#define DEFAULT_STACK_SIZE
ThreadImplLxrt35(Thread *thread, const icl_core::String &description, icl_core::ThreadPriority priority)
virtual icl_core::ThreadPriority priority() const
virtual icl_core::ThreadId threadId() const