mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
Implement thread_ctrl::get_tid()
This commit is contained in:
parent
ded828dfc9
commit
55c75d2c87
@ -2978,3 +2978,12 @@ std::pair<void*, usz> thread_ctrl::get_thread_stack()
|
|||||||
#endif
|
#endif
|
||||||
return {saddr, ssize};
|
return {saddr, ssize};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u64 thread_ctrl::get_tid()
|
||||||
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
return GetCurrentThreadId();
|
||||||
|
#else
|
||||||
|
return reinterpret_cast<u64>(pthread_self());
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
@ -339,6 +339,9 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Get thread ID (works for all threads)
|
||||||
|
static u64 get_tid();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
static const u64 process_affinity_mask;
|
static const u64 process_affinity_mask;
|
||||||
|
Loading…
Reference in New Issue
Block a user