Rewrite cond_variable to use waitable atomics

Increase max_timeout and fix max_timeout usage
This commit is contained in:
Nekotekina 2019-09-09 11:09:30 +03:00
parent 67f31c17d1
commit d13ff285d1
5 changed files with 105 additions and 58 deletions

View file

@ -185,7 +185,7 @@ class thread_ctrl final
static atomic_t<native_core_arrangement> g_native_core_layout;
// Internal waiting function, may throw. Infinite value is -1.
static bool _wait_for(u64 usec);
static void _wait_for(u64 usec);
friend class thread_base;
@ -235,9 +235,9 @@ public:
}
// Wait once with timeout. May spuriously return false.
static inline bool wait_for(u64 usec)
static inline void wait_for(u64 usec)
{
return _wait_for(usec);
_wait_for(usec);
}
// Wait.