diff options
author | crupest <crupest@outlook.com> | 2021-06-10 11:12:25 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-10 11:12:25 +0800 |
commit | 3128281e50d30d12a053bc06018df4efcc8e988e (patch) | |
tree | e6b4cadff0d9b7d7fd055225e78a7013b100e38c /operating-system-experiment/Thread.h | |
parent | a440d1c5648492b24d1a56ec2e841f2309aad3fd (diff) | |
download | life-3128281e50d30d12a053bc06018df4efcc8e988e.tar.gz life-3128281e50d30d12a053bc06018df4efcc8e988e.tar.bz2 life-3128281e50d30d12a053bc06018df4efcc8e988e.zip |
...
Diffstat (limited to 'operating-system-experiment/Thread.h')
-rw-r--r-- | operating-system-experiment/Thread.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/operating-system-experiment/Thread.h b/operating-system-experiment/Thread.h index 69a402c..56fdcb0 100644 --- a/operating-system-experiment/Thread.h +++ b/operating-system-experiment/Thread.h @@ -18,7 +18,6 @@ #include <type_traits>
#include <utility>
#include <vector>
-#include <tuple>
namespace cru {
class CRU_API Thread {
@@ -35,6 +34,20 @@ public: void Join();
void Detach();
+#ifdef CRU_WINDOWS
+ DWORD
+#else
+ pthread_t
+#endif
+ GetNativeID();
+
+#ifdef CRU_WINDOWS
+ HANDLE
+#else
+ pthread_t
+#endif
+ GetNativeHandle();
+
void swap(Thread &other) noexcept;
private:
|