36 #include <sys/thread.h>
40 #include <kernel/OS.h>
48 #define THREAD_PRIORITY_LOWEST 0
49 #define THREAD_PRIORITY_BELOW_NORMAL 1
50 #define THREAD_PRIORITY_NORMAL 2
51 #define THREAD_PRIORITY_ABOVE_NORMAL 3
52 #define THREAD_PRIORITY_HIGHEST 4
59 Thread(
const std::string &name=
"");
132 static void setName(
const std::string &name);
163 tid_t m_kernel_thread_id;
#define DISABLE_CLASS_COPY(C)
Definition basic_macros.h:26
bool wait()
Definition thread.cpp:147
virtual ~Thread()
Definition thread.cpp:79
bool stop()
Definition thread.cpp:140
std::mutex m_start_finished_mutex
Definition thread.h:155
void * m_retval
Definition thread.h:150
std::thread::native_handle_type getThreadHandle()
Definition thread.h:145
bool setPriority(int prio)
Definition thread.cpp:329
static unsigned int getNumberOfProcessors()
Definition thread.cpp:264
bool m_joinable
Definition thread.h:151
std::string m_name
Definition thread.h:140
bool getReturnValue(void **ret)
Definition thread.cpp:167
std::atomic< bool > m_running
Definition thread.h:153
static void threadProc(Thread *thr)
Definition thread.cpp:177
Thread(const std::string &name="")
Definition thread.cpp:68
bool isRunning()
Definition thread.h:91
static Thread * getCurrentThread()
Definition thread.cpp:205
bool bindToProcessor(unsigned int proc_number)
Definition thread.cpp:270
std::atomic< bool > m_request_stop
Definition thread.h:152
bool start()
Definition thread.cpp:109
bool stopRequested()
Definition thread.h:92
std::mutex m_mutex
Definition thread.h:154
std::thread * m_thread_obj
Definition thread.h:157
static void setName(const std::string &name)
Definition thread.cpp:211
std::thread::id getThreadId()
Definition thread.h:94
bool isCurrentThread()
Definition thread.h:89