summaryrefslogtreecommitdiff
path: root/Kernel/Scheduler.h
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Scheduler.h')
-rw-r--r--Kernel/Scheduler.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/Kernel/Scheduler.h b/Kernel/Scheduler.h
index ea374fa946..7ed8642caf 100644
--- a/Kernel/Scheduler.h
+++ b/Kernel/Scheduler.h
@@ -43,28 +43,25 @@ struct SchedulerData;
extern Thread* g_finalizer;
extern Thread* g_colonel;
extern WaitQueue* g_finalizer_wait_queue;
-extern bool g_finalizer_has_work;
+extern Atomic<bool> g_finalizer_has_work;
extern u64 g_uptime;
extern SchedulerData* g_scheduler_data;
extern timeval g_timeofday;
class Scheduler {
public:
- static void initialize();
+ static void initialize(u32 cpu);
static void timer_tick(const RegisterState&);
+ [[noreturn]] static void start();
static bool pick_next();
static timeval time_since_boot();
- static void pick_next_and_switch_now();
- static void switch_now();
static bool yield();
static bool donate_to(Thread*, const char* reason);
static bool context_switch(Thread&);
- static void prepare_to_modify_tss(Thread&);
static Process* colonel();
- static bool is_active();
static void beep();
static void idle_loop();
- static void stop_idling();
+ static void invoke_async();
template<typename Callback>
static inline IterationDecision for_each_runnable(Callback);
@@ -74,9 +71,6 @@ public:
static void init_thread(Thread& thread);
static void update_state_for_thread(Thread& thread);
-
-private:
- static void prepare_for_iret_to_new_process();
};
}