Restore thread counter (world may be not ready yet)
Remove dumb 1300ms timeout.
This commit is contained in:
@@ -192,6 +192,9 @@ class thread_ctrl final
|
||||
// Target cpu core layout
|
||||
static atomic_t<native_core_arrangement> g_native_core_layout;
|
||||
|
||||
// Global thread counter
|
||||
static inline atomic_t<u64> g_thread_count = 0;
|
||||
|
||||
// Internal waiting function, may throw. Infinite value is -1.
|
||||
static void _wait_for(u64 usec, bool alert);
|
||||
|
||||
@@ -275,6 +278,11 @@ public:
|
||||
return g_tls_this_thread;
|
||||
}
|
||||
|
||||
static u64 get_count()
|
||||
{
|
||||
return g_thread_count.load();
|
||||
}
|
||||
|
||||
// Detect layout
|
||||
static void detect_cpu_layout();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user