Restore thread counter (world may be not ready yet)

Remove dumb 1300ms timeout.
This commit is contained in:
Nekotekina 2020-02-25 11:43:04 +03:00
parent cd40bc8c61
commit 7eebe06931
4 changed files with 19 additions and 3 deletions

View file

@ -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();