mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
Implement thread_ctrl::get_tid()
This commit is contained in:
parent
ded828dfc9
commit
55c75d2c87
2 changed files with 12 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue