icl_core_thread/ThreadImplLxrt35.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 // This file is part of FZIs ic_workspace.
5 //
6 // This program is free software licensed under the LGPL
7 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
8 // You can find a copy of this license in LICENSE folder in the top
9 // directory of the source code.
10 //
11 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
12 //
13 // -- END LICENSE BLOCK ------------------------------------------------
14 
15 //----------------------------------------------------------------------
30 //----------------------------------------------------------------------
31 #ifndef ICL_CORE_THREAD_THREAD_IMPL_LXRT35_H_INCLUDED
32 #define ICL_CORE_THREAD_THREAD_IMPL_LXRT35_H_INCLUDED
33 
34 #include <rtai_posix.h>
35 
36 #include <icl_core/os_thread.h>
37 
39 
40 namespace icl_core {
41 namespace thread {
42 
43 class Thread;
44 
49 class ThreadImplLxrt35 : public ThreadImpl, protected virtual icl_core::Noncopyable
50 {
51 public:
52  ThreadImplLxrt35(Thread *thread, const icl_core::String& description,
54 
55  virtual ~ThreadImplLxrt35();
56 
57  virtual void cancel();
58  virtual icl_core::String getDescription() const { return m_description; }
59  virtual bool isHardRealtime() const;
60  virtual bool executesHardRealtime() const;
61  virtual void join();
62  virtual icl_core::ThreadPriority priority() const;
63  virtual void setDescription(const icl_core::String& description) { m_description = description; }
64  virtual bool setHardRealtime(bool hard_realtime);
65  virtual bool setPriority(icl_core::ThreadPriority priority);
66  virtual bool start();
67  virtual icl_core::ThreadId threadId() const;
68 
69 private:
70  static void *runThread(void *arg);
71 
72  pthread_t m_thread_id;
76 
77  RT_TASK *m_rt_task;
78 
79  pthread_barrier_t *m_rt_start_sync;
80 };
81 
82 }
83 }
84 
85 #endif
ICL_CORE_OS_IMPL_NS::ThreadId ThreadId
Definition: os_thread.h:49
virtual bool setPriority(icl_core::ThreadPriority priority)
Contains icl_core::thread::ThreadImpl.
Contains global thread related functions, encapsulated into the icl_core::os namespace.
std::string String
Definition: BaseTypes.h:43
ThreadImplLxrt35(Thread *thread, const icl_core::String &description, icl_core::ThreadPriority priority)
virtual icl_core::ThreadPriority priority() const
int32_t ThreadPriority
Definition: os_thread.h:50
virtual icl_core::ThreadId threadId() const
virtual void setDescription(const icl_core::String &description)
virtual icl_core::String getDescription() const


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:58