Added tid global tools
This commit is contained in:
@@ -7,7 +7,10 @@
|
|||||||
namespace nb {
|
namespace nb {
|
||||||
|
|
||||||
uint64_t GetPID();
|
uint64_t GetPID();
|
||||||
uint64_t getTID();
|
uint64_t GetTID();
|
||||||
|
|
||||||
|
extern thread_local const uint64_t CurrentTID;
|
||||||
|
static const uint64_t MainTID = GetTID();
|
||||||
|
|
||||||
|
|
||||||
} // namespace nb
|
} // namespace nb
|
||||||
|
|||||||
@@ -26,4 +26,6 @@ uint64_t GetTID() {
|
|||||||
#ifdef _NB_TARGET_LINUX
|
#ifdef _NB_TARGET_LINUX
|
||||||
#endif // _NB_TARGET_LINUX
|
#endif // _NB_TARGET_LINUX
|
||||||
|
|
||||||
|
thread_local const uint64_t CurrentTID = GetTID();
|
||||||
|
|
||||||
} // namespace nb
|
} // namespace nb
|
||||||
Reference in New Issue
Block a user