diff options
author | Elias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com> | 2020-11-04 16:57:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 16:57:47 +0100 |
commit | 3e16c3a78fff61c20e63ba730d15e94e3bb877b4 (patch) | |
tree | c070350db219f2c4241d22bc31949685c7b42fe9 /src/threading/thread.h | |
parent | 5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc (diff) | |
parent | 6ccb5835ff55d85156be91473c598eca9d6cb9a6 (diff) | |
download | dragonfireclient-3e16c3a78fff61c20e63ba730d15e94e3bb877b4.tar.xz |
Merge branch 'master' into master
Diffstat (limited to 'src/threading/thread.h')
-rw-r--r-- | src/threading/thread.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/threading/thread.h b/src/threading/thread.h index aee2aa357..cea92226f 100644 --- a/src/threading/thread.h +++ b/src/threading/thread.h @@ -33,7 +33,7 @@ DEALINGS IN THE SOFTWARE. #include <mutex> #ifdef _AIX -#include <sys/thread.h> // for tid_t + #include <sys/thread.h> // for tid_t #endif /* @@ -41,17 +41,18 @@ DEALINGS IN THE SOFTWARE. * even divisions between the minimum and maximum reported thread priority. */ #if !defined(_WIN32) -#define THREAD_PRIORITY_LOWEST 0 -#define THREAD_PRIORITY_BELOW_NORMAL 1 -#define THREAD_PRIORITY_NORMAL 2 -#define THREAD_PRIORITY_ABOVE_NORMAL 3 -#define THREAD_PRIORITY_HIGHEST 4 + #define THREAD_PRIORITY_LOWEST 0 + #define THREAD_PRIORITY_BELOW_NORMAL 1 + #define THREAD_PRIORITY_NORMAL 2 + #define THREAD_PRIORITY_ABOVE_NORMAL 3 + #define THREAD_PRIORITY_HIGHEST 4 #endif -class Thread -{ + + +class Thread { public: - Thread(const std::string &name = ""); + Thread(const std::string &name=""); virtual ~Thread(); DISABLE_CLASS_COPY(Thread) @@ -140,9 +141,7 @@ protected: private: std::thread::native_handle_type getThreadHandle() - { - return m_thread_obj->native_handle(); - } + { return m_thread_obj->native_handle(); } static void threadProc(Thread *thr); @@ -155,9 +154,11 @@ private: std::thread *m_thread_obj = nullptr; + #ifdef _AIX // For AIX, there does not exist any mapping from pthread_t to tid_t // available to us, so we maintain one ourselves. This is set on thread start. tid_t m_kernel_thread_id; #endif }; + |