tools.hpp
1 
8 #pragma once
9 
10 #include <thread>
11 #include <string>
12 
16 namespace ethread {
21  uint32_t getId();
27  uint32_t getId(std::thread& _thread);
32  void setName(const std::string& _name);
38  void setName(std::thread& _thread, const std::string& _name);
43  std::string getName();
49  std::string getName(std::thread& _thread);
55  void setPriority(int32_t _priority);
62  void setPriority(std::thread& _thread, int32_t _priority);
67  int32_t getPriority();
73  int32_t getPriority(std::thread& _thread);
74 }
ethread main namespace
Definition: tools.hpp:16
void setPriority(int32_t _priority)
Set the Current thread priority [-20..0] for RT and ]0..50] for normal priority.
void setName(const std::string &_name)
Set the Current thread name.
uint32_t getId()
get human readable thread ID. (not the std::thread::get_id())
int32_t getPriority()
get the Current thread priority [-20..0] for RT and ]0..50] for normal priority
std::string getName()
Set the Current thread name.