Kernel: Clean up around Scheduler::yield() a bit.

Also add assertion in Lock that the scheduler isn't currently active.
I've been seeing occasional fuckups that I suspect might be someone called
by the scheduler trying to take a busy lock.
This commit is contained in:
Andreas Kling 2019-02-06 15:05:47 +01:00
commit 8cc6e304ca
Notes: sideshowbarker 2024-07-19 15:51:03 +09:00
4 changed files with 23 additions and 28 deletions

View file

@ -19,8 +19,7 @@ public:
static bool context_switch(Process&);
static void prepare_to_modify_tss(Process&);
static Process* colonel();
static bool is_active();
private:
static void prepare_for_iret_to_new_process();
};
int sched_yield();