[kernel] Fix scheduler deadlocks
The scheduler queue locks could deadlock if the timer fired before the scoped lock destructor ran. Also, reduce lock contention by letting only one CPU steal work at a time.
This commit is contained in:
@@ -97,7 +97,7 @@ private:
|
||||
// TODO: lol a real clock
|
||||
uint64_t m_clock = 0;
|
||||
|
||||
kutil::spinlock m_steal_lock;
|
||||
unsigned m_steal_turn = 0;
|
||||
static scheduler *s_instance;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user