mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 02:03:06 -05:00
24 lines
506 B
C++
24 lines
506 B
C++
#pragma once
|
|
|
|
#include <AK/Assertions.h>
|
|
|
|
class Process;
|
|
struct RegisterDump;
|
|
|
|
extern Process* current;
|
|
|
|
class Scheduler {
|
|
public:
|
|
static void initialize();
|
|
static void timer_tick(RegisterDump&);
|
|
static bool pick_next();
|
|
static void pick_next_and_switch_now();
|
|
static void switch_now();
|
|
static bool yield();
|
|
static bool context_switch(Process&);
|
|
static void prepare_to_modify_tss(Process&);
|
|
private:
|
|
static void prepare_for_iret_to_new_process();
|
|
};
|
|
|
|
int sched_yield();
|