Max OS 0.3
Loading...
Searching...
No Matches
MaxOS::processes::GlobalScheduler Class Reference

The global scheduler that manages all processes and threads across all cores. More...

#include <scheduler.h>

Inheritance diagram for MaxOS::processes::GlobalScheduler:
MaxOS::hardwarecommunication::InterruptHandler

Public Member Functions

 GlobalScheduler (system::Multiboot &multiboot)
 Constructs a new Global Scheduler object. Registers as the interrupt handler for interrupt 0x20 and setups the shared resource registries. Loads any ELF files from the multiboot structure.
 
 ~GlobalScheduler ()
 Destroys the global scheduler and frees the per core schedulers.
 
system::cpu_status_t * handle_interrupt (system::cpu_status_t *status) final
 Handles the interrupt 0x20.
 
void balance ()
 Moves processes and threads between cores to balance the load so that each core has a similar amount of threads and processes.
 
system::Core * least_busy_core (bool check_threads=false)
 Finds the core with the least amount of threads/processes.
 
uint64_t add_process (Process *process, Scheduler *scheduler=nullptr)
 Adds a process to the least busy core.
 
uint64_t add_thread (Thread *thread, Scheduler *scheduler=nullptr)
 Adds a thread to the least busy core.
 
- Public Member Functions inherited from MaxOS::hardwarecommunication::InterruptHandler
virtual void handle_interrupt ()
 Handles an interrupt.
 

Static Public Member Functions

static GlobalScheduler * system_scheduler ()
 Gets the system scheduler.
 
static Scheduler * core_scheduler ()
 Gets the scheduler for the currently executing core.
 
static void activate ()
 Activates each core's scheduler.
 
static void deactivate ()
 Deactivates each core's scheduler.
 
static bool is_active ()
 Checks if the global scheduler is active.
 
static void load_multiboot_elfs (system::Multiboot *multiboot)
 Loads any valid ELF files from the multiboot structure.
 
static void prepare_initrd (multiboot_tag_module *module)
 Loads the initrd into the init program at 0xFFF000.
 
static void print_running_header ()
 Print the header for the running processes in the form ({name}:t{tid}c{core})
 
static uint64_t remove_process (Process *process)
 Removes a process from the scheduler if the process has no threads, if it does then the threads are stopped but the process is not removed (this will be done automatically when all threads are stopped)
 
static system::cpu_status_t * force_remove_process (Process *process)
 Removes a process from the scheduler and deletes all threads, begins running the next process.
 
static Process * current_process ()
 Gets the process on the currently executing core.
 
static Process * get_process (uint64_t pid)
 Gets a process on the currently executing core by its PID.
 
static uint64_t next_pid ()
 Gets the next usable global PID.
 
static Thread * current_thread ()
 Gets the thread on the currently executing core.
 
static Thread * get_thread (uint64_t tid)
 Gets a thread on the currently executing core by its TID.
 
static uint64_t next_tid ()
 Gets the next usable global TID.
 

Additional Inherited Members

- Protected Member Functions inherited from MaxOS::hardwarecommunication::InterruptHandler
 InterruptHandler (uint8_t interrupt_number, int64_t redirect=-1, uint64_t redirect_index=0)
 Creates a new interrupt handler and registers it with the interrupt manager.
 
virtual ~InterruptHandler ()
 Destroys the interrupt handler and unregisters it from the interrupt manager.
 
- Protected Attributes inherited from MaxOS::hardwarecommunication::InterruptHandler
uint8_t m_interrupt_number
 The interrupt number this handler handles.
 

Detailed Description

The global scheduler that manages all processes and threads across all cores.

Definition at line 28 of file scheduler.h.

Constructor & Destructor Documentation

◆ GlobalScheduler()

GlobalScheduler::GlobalScheduler ( system::Multiboot &  multiboot)
explicit

Constructs a new Global Scheduler object. Registers as the interrupt handler for interrupt 0x20 and setups the shared resource registries. Loads any ELF files from the multiboot structure.

Parameters
multibootThe multiboot structure that may contain ELF files to load

Definition at line 29 of file scheduler.cpp.

30: InterruptHandler(0x20),
31 m_shared_memory_registry(resource_type_t::SHARED_MEMORY),
32 m_shared_messages_registry(resource_type_t::MESSAGE_ENDPOINT),
33 m_next_pid(0),
34 m_next_tid(0)
35{
36
37 // Set up the global scheduler
38 Logger::INFO() << "Setting up global Scheduler\n";
39 s_instance = this;
40
41 // Set up the per core scheduler
42 for(const auto& core : CPU::cores)
43 core -> scheduler = new Scheduler(core->id);
44
45 // Load the elfs
46 load_multiboot_elfs(&multiboot);
47
48}
static LogRecord INFO()
Gets the active logger for info logs.
Definition logger.cpp:195
Handles a certain interrupt number.
Definition interrupts.h:44
static void load_multiboot_elfs(system::Multiboot *multiboot)
Loads any valid ELF files from the multiboot structure.
Schedules processes to run on the core via their threads.
Definition scheduler.h:90
Manages the CPU and its cores.
Definition cpu.h:256

References MaxOS::system::CPU::cores, MaxOS::Logger::INFO(), and load_multiboot_elfs().

◆ ~GlobalScheduler()

GlobalScheduler::~GlobalScheduler ( )

Destroys the global scheduler and frees the per core schedulers.

Definition at line 81 of file scheduler.cpp.

81 {
82
83 // No longer the global instance
84 s_instance = nullptr;
85
86 // Free the per core scheduler
87 for(const auto& core : CPU::cores)
88 delete core->scheduler;
89
90}

References MaxOS::system::CPU::cores.

Member Function Documentation

◆ activate()

void GlobalScheduler::activate ( )
static

Activates each core's scheduler.

Definition at line 95 of file scheduler.cpp.

95 {
96
97 s_instance -> m_active = true;
98 for(const auto& core : CPU::cores)
99 core->scheduler->activate();
100
101}
static void activate()
Activates each core's scheduler.
Definition scheduler.cpp:95

References MaxOS::system::CPU::cores.

Referenced by kernel_main().

◆ add_process()

uint64_t GlobalScheduler::add_process ( Process *  process,
Scheduler *  scheduler = nullptr 
)

Adds a process to the least busy core.

Parameters
processThe process to add
schedulerOptional, specify a specific scheduler to add to
Returns
The pid of the new process

Definition at line 234 of file scheduler.cpp.

234 {
235
236 // No cores?
237 if(CPU::cores.empty())
238 return 0;
239
240 // Find the core with the least processes
241 if (!scheduler)
242 scheduler = least_busy_core()->scheduler;
243 auto core_id = scheduler->core_id();
244
245 // Save the pid
246 auto pid = scheduler->add_process(process);
247 m_core_pids.insert(pid,core_id);
248
249 //@TODO better way to do this
250 if (process->name == DEBUG_TARGET && DO_DEBUGGING) {
251 Logger::DEBUG() << "Starting PROG with GDB\n";
252 auto serial = new SerialConsole();
253 auto debugger = new GDBServer(serial);
254 debugger->attach(process->threads()[0]);
255 }
256
257 Logger::DEBUG() << "Adding process " << pid << ": " << process->name << " to core " << core_id <<"\n";
258 return pid;
259}
static LogRecord DEBUG()
Gets the active logger for debug logs.
Definition logger.cpp:204
A driver for the serial output.
Definition serial.h:25
system::Core * least_busy_core(bool check_threads=false)
Finds the core with the least amount of threads/processes.
string name
The name of the process.
Definition process.h:118
common::Vector< Thread * > threads()
Gets the threads of the process.
Definition process.cpp:419
uint64_t add_process(Process *process)
Adds a process to the scheduler.
uint64_t core_id() const
Gets the core that this scheduler handles processes for.
Handler for running a GDB server over serial.
Definition gdbstub.h:71
static common::Vector< Core * > cores
The list of CPU cores in the system (populated during initialization, includes the BSP and cores that...
Definition cpu.h:273
processes::Scheduler * scheduler
The scheduler for this core.
Definition cpu.h:249

References MaxOS::processes::Scheduler::add_process(), MaxOS::processes::Scheduler::core_id(), MaxOS::system::CPU::cores, MaxOS::Logger::DEBUG(), MaxOS::runtime::DEBUG_TARGET, MaxOS::runtime::DO_DEBUGGING, least_busy_core(), MaxOS::processes::Process::name, MaxOS::system::Core::scheduler, and MaxOS::processes::Process::threads().

Referenced by load_multiboot_elfs(), and MaxOS::processes::Scheduler::Scheduler().

◆ add_thread()

uint64_t GlobalScheduler::add_thread ( Thread *  thread,
Scheduler *  scheduler = nullptr 
)

Adds a thread to the least busy core.

Parameters
threadThe thread to add
schedulerOptional, specify a specific scheduler to add to
Returns
The tid of the new thread

Definition at line 268 of file scheduler.cpp.

268 {
269
270 // No cores?
271 if(CPU::cores.empty())
272 return 0;
273
274 // Find the core with the least threads
275 if (!scheduler)
276 scheduler = least_busy_core(true)->scheduler;
277 auto core_id = scheduler->core_id();
278
279 // Save the tid
280 auto tid = scheduler->add_thread(thread);
281 m_core_tids.insert(tid,core_id);
282
283 Logger::DEBUG() << "Adding thread " << tid << " to core " << core_id <<"\n";
284 return tid;
285}
uint64_t add_thread(Thread *thread)
Adds a thread to the scheduler.

References MaxOS::processes::Scheduler::add_thread(), MaxOS::processes::Scheduler::core_id(), MaxOS::system::CPU::cores, MaxOS::Logger::DEBUG(), least_busy_core(), and MaxOS::system::Core::scheduler.

◆ balance()

void GlobalScheduler::balance ( )

Moves processes and threads between cores to balance the load so that each core has a similar amount of threads and processes.

Todo:
Implement

Definition at line 120 of file scheduler.cpp.

120 {
121
122}

◆ core_scheduler()

Scheduler * GlobalScheduler::core_scheduler ( )
static

Gets the scheduler for the currently executing core.

Returns
The scheduler for this core

Definition at line 398 of file scheduler.cpp.

398 {
400}
static Core * executing_core()
Gets the core that is currently executing.
Definition cpu.cpp:660

References MaxOS::system::CPU::executing_core(), and MaxOS::system::Core::scheduler.

Referenced by current_process(), current_thread(), handle_interrupt(), MaxOS::system::CPU::PANIC(), and MaxOS::processes::Thread::yield().

◆ current_process()

Process * GlobalScheduler::current_process ( )
static

Gets the process on the currently executing core.

Returns
The current process, or nullptr if not found

Definition at line 325 of file scheduler.cpp.

325 {
326 if(!s_instance || !s_instance ->m_active)
327 return nullptr;
328
330}
static Scheduler * core_scheduler()
Gets the scheduler for the currently executing core.
Process * current_process()
Gets the current process.

References core_scheduler(), and MaxOS::processes::Scheduler::current_process().

Referenced by MaxOS::processes::resources::ProcessResourceRegistry::create_resource(), MaxOS::memory::VirtualMemoryManager::free(), MaxOS::memory::MemoryManager::free(), MaxOS::processes::resources::ProcessResourceRegistry::get_resource(), MaxOS::runtime::GDBServer::handle_remove_breakpoint(), MaxOS::runtime::GDBServer::handle_set_breakpoint(), MaxOS::memory::VirtualMemoryManager::load_shared_memory(), MaxOS::memory::MemoryManager::malloc(), MaxOS::processes::SharedMemory::open(), MaxOS::system::CPU::PANIC(), MaxOS::system::CPU::prepare_for_panic(), print_running_header(), MaxOS::processes::SharedMemory::read(), MaxOS::runtime::GDBServer::send_memory(), MaxOS::processes::resources::BridgeHandler::send_to_bridge(), MaxOS::system::SyscallManager::syscall_resource_close(), MaxOS::system::SyscallManager::syscall_resource_open(), MaxOS::system::SyscallManager::syscall_resource_read(), and MaxOS::system::SyscallManager::syscall_resource_write().

◆ current_thread()

Thread * GlobalScheduler::current_thread ( )
static

Gets the thread on the currently executing core.

Returns
The currently executing thread

Definition at line 361 of file scheduler.cpp.

361 {
362
363 if(!s_instance || !s_instance ->m_active)
364 return nullptr;
365
366 return core_scheduler()->current_thread();
367}
Thread * current_thread()
Gets the currently executing thread.

References core_scheduler(), and MaxOS::processes::Scheduler::current_thread().

Referenced by MaxOS::processes::BlockingLock::acquire(), MaxOS::processes::resources::ThreadResourceRegistry::get_resource(), MaxOS::runtime::TrapFlagExcpetion::handle_interrupt(), MaxOS::runtime::BreakPointException::handle_interrupt(), print_running_header(), MaxOS::processes::SharedMessageEndpoint::read(), and MaxOS::processes::resources::BridgeHandler::send_to_bridge().

◆ deactivate()

void GlobalScheduler::deactivate ( )
static

Deactivates each core's scheduler.

Definition at line 106 of file scheduler.cpp.

106 {
107
108 s_instance -> m_active = false;
109 for(const auto& core : CPU::cores)
110 core->scheduler->deactivate();
111
112}
static void deactivate()
Deactivates each core's scheduler.

References MaxOS::system::CPU::cores.

Referenced by MaxOS::system::CPU::prepare_for_panic().

◆ force_remove_process()

system::cpu_status_t * GlobalScheduler::force_remove_process ( Process *  process)
static

Removes a process from the scheduler and deletes all threads, begins running the next process.

Parameters
processThe process to remove
Returns
The status of the CPU for the next process to run or nullptr if the process was not found

Definition at line 309 of file scheduler.cpp.

309 {
310
311 // Get the core running the process
312 if(!s_instance)
313 return nullptr;
314
315 auto core = s_instance -> m_core_pids[process->pid()];
316 return CPU::cores[core]->scheduler->force_remove_process(process);
317
318}
uint64_t pid() const
Gets the pid of the process.
Definition process.cpp:429

References MaxOS::system::CPU::cores, and MaxOS::processes::Process::pid().

Referenced by MaxOS::system::CPU::prepare_for_panic().

◆ get_process()

Process * GlobalScheduler::get_process ( uint64_t  pid)
static

Gets a process on the currently executing core by its PID.

Parameters
pidThe process ID
Returns
The process or nullptr if not found

Definition at line 338 of file scheduler.cpp.

338 {
339
340 // Get the core running the pid
341 if(!s_instance)
342 return nullptr;
343
344 auto core = s_instance -> m_core_pids[pid];
345 return CPU::cores[core]->scheduler->get_process(pid);
346}

References MaxOS::system::CPU::cores.

Referenced by MaxOS::processes::resources::ProcessResourceRegistry::get_resource(), MaxOS::runtime::GDBServer::handle_remove_breakpoint(), MaxOS::runtime::GDBServer::handle_set_breakpoint(), prepare_initrd(), and MaxOS::runtime::GDBServer::send_memory().

◆ get_thread()

Thread * GlobalScheduler::get_thread ( uint64_t  tid)
static

Gets a thread on the currently executing core by its TID.

Parameters
tidThe thread ID
Returns
The thread or nullptr if not found

Definition at line 375 of file scheduler.cpp.

375 {
376
377 // Get the core running the tid
378 if(!s_instance)
379 return nullptr;
380
381 auto core = s_instance -> m_core_tids[tid];
382 return CPU::cores[core]->scheduler->get_thread(tid);
383}

References MaxOS::system::CPU::cores.

Referenced by MaxOS::processes::resources::ThreadResourceRegistry::get_resource(), and MaxOS::processes::BlockingLock::release().

◆ handle_interrupt()

system::cpu_status_t * GlobalScheduler::handle_interrupt ( system::cpu_status_t *  status)
finalvirtual

Handles the interrupt 0x20.

Parameters
statusThe current CPU status
Returns
The new CPU status

Reimplemented from MaxOS::hardwarecommunication::InterruptHandler.

Definition at line 67 of file scheduler.cpp.

67 {
68
69 // Scheduler not active
70 if(!s_instance || !s_instance->m_active)
71 return status;
72
73 auto s = core_scheduler()->schedule(status);
74 ASSERT(s->rip != 0, "Cant run a empty state\n");
75 return s;
76}
system::cpu_status_t * schedule(system::cpu_status_t *cpu_state)
Schedules the next thread to run.

References core_scheduler(), and MaxOS::processes::Scheduler::schedule().

◆ is_active()

bool GlobalScheduler::is_active ( )
static

Checks if the global scheduler is active.

Returns
True if the scheduler is active, false otherwise

Definition at line 407 of file scheduler.cpp.

407 {
408 if (!s_instance)
409 return false;
410
411 return s_instance->m_active;
412}

Referenced by MaxOS::system::CPU::prepare_for_panic().

◆ least_busy_core()

Core * GlobalScheduler::least_busy_core ( bool  check_threads = false)

Finds the core with the least amount of threads/processes.

Parameters
check_threadsIf true also check for least amount of threads, defaults to false
Returns
The core with the lowest work load

Definition at line 130 of file scheduler.cpp.

130 {
131
132 // Find the scheduler with the lowest work load
133 auto core = CPU::cores[0];
134 for(const auto& current : CPU::cores)
135 if((check_threads && current->scheduler->thread_amount() < core->scheduler->thread_amount())
136 || current->scheduler->process_amount() < core->scheduler->process_amount())
137 core = current;
138
139
140 return core;
141
142}

References MaxOS::system::CPU::cores.

Referenced by add_process(), and add_thread().

◆ load_multiboot_elfs()

void GlobalScheduler::load_multiboot_elfs ( system::Multiboot *  multiboot)
static

Loads any valid ELF files from the multiboot structure.

Parameters
multibootThe multiboot structure

Definition at line 150 of file scheduler.cpp.

150 {
151
152 for (multiboot_tag* tag = multiboot->start_tag(); tag->type != MULTIBOOT_TAG_TYPE_END; tag = (struct multiboot_tag*) ((multiboot_uint8_t*) tag + ((tag->size + 7) & ~7))) {
153
154 // Tag is not an module
155 if (tag->type != MULTIBOOT_TAG_TYPE_MODULE)
156 continue;
157
158 // Get the tag
159 auto* module = (struct multiboot_tag_module*) tag;
160 auto start = (uintptr_t)PhysicalMemoryManager::to_dm_region(module->mod_start);
161 Logger::DEBUG() << "Creating process from multiboot module for " << module->cmdline << " (at 0x" << (uint64_t) module->mod_start << ")\n";
162
163 // Handle the init ramdisk
164 if (strcmp(module->cmdline, "initrd") == 0)
165 prepare_initrd(module);
166
167 // Try to create the elf from the module
168 ELF64 elf(start);
169 if (!elf.is_valid())
170 continue;
171
172 // Create an array of args for the process
173 char* args[1] = {module->cmdline};
174
175 // Create the process
176 auto* process = new Process(module->cmdline, args, 1, &elf);
177 system_scheduler() -> add_process(process);
178
179 Logger::DEBUG() << "ELF loaded to pid " << process->pid() << "\n";
180 }
181}
static void * to_dm_region(uintptr_t physical_address)
Converts a physical address to a direct map region address if it is in the lower region using the hig...
Definition physical.cpp:929
Handles the loading and parsing of 64-bit ELF files.
Definition elf.h:217
uint64_t add_process(Process *process, Scheduler *scheduler=nullptr)
Adds a process to the least busy core.
static void prepare_initrd(multiboot_tag_module *module)
Loads the initrd into the init program at 0xFFF000.
static GlobalScheduler * system_scheduler()
Gets the system scheduler.
Definition scheduler.cpp:55
A process that can be scheduled by the Scheduler, wraps & manages threads as well as its own address ...
Definition process.h:94
multiboot_tag * start_tag() const
Common header for all multiboot info tags.
Definition multiboot.h:234

References add_process(), MaxOS::Logger::DEBUG(), MaxOS::processes::ELF64::is_valid(), prepare_initrd(), MaxOS::system::Multiboot::start_tag(), system_scheduler(), and MaxOS::memory::PhysicalMemoryManager::to_dm_region().

Referenced by GlobalScheduler().

◆ next_pid()

uint64_t GlobalScheduler::next_pid ( )
static

Gets the next usable global PID.

Returns

Definition at line 352 of file scheduler.cpp.

352 {
353 return s_instance -> m_next_pid++;
354}

Referenced by MaxOS::processes::Scheduler::add_process().

◆ next_tid()

uint64_t GlobalScheduler::next_tid ( )
static

Gets the next usable global TID.

Returns

Definition at line 389 of file scheduler.cpp.

389 {
390 return s_instance->m_next_tid++;
391}

Referenced by MaxOS::processes::Scheduler::add_thread().

◆ prepare_initrd()

void GlobalScheduler::prepare_initrd ( multiboot_tag_module *  module)
static

Loads the initrd into the init program at 0xFFF000.

Parameters
moduleThe initrd module
Todo:
dont hardcode pid (and maybe not rely on Init being ordered after module)

Definition at line 190 of file scheduler.cpp.

190 {
191
192 // Find the Init process
193 Process* init_process = get_process(4);
194 ASSERT(init_process != nullptr, "Can't find init process\n");
195
196 // Extract info
197 auto start = (uintptr_t)PhysicalMemoryManager::to_dm_region(module->mod_start);
198 uint32_t size = module->mod_end - module->mod_start;
199
200 // Prepare
201 size_t actual_size;
202 MemoryManager::switch_active_memory_manager(init_process->memory_manager);
203 init_process->memory_manager->vmm()->allocate(0xFFF000, size + sizeof(uint32_t), actual_size, WRITE | PRESENT);
204
205 // Copy
206 memcpy((void*)0xFFF000, &size, sizeof(uint32_t));
207 memcpy((void*)(0xFFF000 + sizeof(uint32_t)), (void*)start, size);
208 MemoryManager::switch_active_memory_manager(MemoryManager::s_kernel_memory_manager);
209}
static MemoryManager * s_kernel_memory_manager
The memory manager for any kernel processes and all kernel allocations.
void * allocate(size_t size, size_t flags)
Allocate a new chunk of virtual memory.
Definition virtual.cpp:113
static Process * get_process(uint64_t pid)
Gets a process on the currently executing core by its PID.
memory::MemoryManager * memory_manager
The manager for memory used by this process.
Definition process.h:121
multiboot_uint32_t mod_start
The starting address of the module.
Definition multiboot.h:256

References MaxOS::memory::VirtualMemoryManager::allocate(), get_process(), MaxOS::processes::Process::memory_manager, multiboot_tag_module::mod_start, MaxOS::memory::PRESENT, MaxOS::memory::MemoryManager::s_kernel_memory_manager, MaxOS::memory::PhysicalMemoryManager::to_dm_region(), MaxOS::memory::BumpMemoryManager::vmm(), and MaxOS::memory::WRITE.

Referenced by load_multiboot_elfs().

◆ print_running_header()

void GlobalScheduler::print_running_header ( )
static

Print the header for the running processes in the form ({name}:t{tid}c{core})

Definition at line 214 of file scheduler.cpp.

214 {
215
216 // No threads or processes to get
217 if(!s_instance || !s_instance->m_active)
218 return;
219
220 auto process = current_process();
221 auto thread = current_thread();
222
223 Logger::active_logger()->printf("(%s:t%dc%d) ",process->name.c_str(), thread->tid,CPU::executing_core()->id);
224}
void printf(const char *format,...)
Prints a formatted string to the logger (thread safe)
Definition logger.cpp:250
static Logger * active_logger()
Gets the active logger (to be used to modify the logger)
Definition logger.cpp:240
static Process * current_process()
Gets the process on the currently executing core.
static Thread * current_thread()
Gets the thread on the currently executing core.
uint8_t id
The ID of this core.
Definition cpu.h:243

References MaxOS::Logger::active_logger(), current_process(), current_thread(), MaxOS::system::CPU::executing_core(), MaxOS::system::Core::id, and MaxOS::Logger::printf().

Referenced by MaxOS::Logger::set_log_level().

◆ remove_process()

uint64_t GlobalScheduler::remove_process ( Process *  process)
static

Removes a process from the scheduler if the process has no threads, if it does then the threads are stopped but the process is not removed (this will be done automatically when all threads are stopped)

Parameters
processThe process to remove
Returns
-1 if the process has threads, 0 otherwise

Definition at line 293 of file scheduler.cpp.

293 {
294
295 // Get the core running the process
296 if(!s_instance)
297 return 0;
298
299 auto core = s_instance -> m_core_pids[process->pid()];
300 return CPU::cores[core]->scheduler->remove_process(process);
301}

References MaxOS::system::CPU::cores, and MaxOS::processes::Process::pid().

Referenced by MaxOS::processes::resources::ProcessResource::close(), and MaxOS::processes::resources::ProcessResource::write().

◆ system_scheduler()

GlobalScheduler * GlobalScheduler::system_scheduler ( )
static

Gets the system scheduler.

Returns
The system scheduler or nullptr if not found

Definition at line 55 of file scheduler.cpp.

55 {
56
57 return s_instance;
58}

Referenced by MaxOS::processes::resources::ProcessResourceRegistry::create_resource(), load_multiboot_elfs(), MaxOS::system::CPU::prepare_for_panic(), and MaxOS::processes::Scheduler::Scheduler().


The documentation for this class was generated from the following files: