sched: Implement basic scheduling and signal handling system
Note: this is probably 25% broken, but it works right now as written, so I hope it all works. - Added a new scheduler header file (scheduler.h) defining task structures, scheduling policies, and signal handling mechanisms. - Integrated scheduling functions into the syscall interface, including SYS_GETPID, SYS_GETPPID, SYS_EXIT, SYS_SCHED_YIELD, SYS_NICE, SYS_KILL, SYS_SIGACTION, SYS_SIGPROCMASK, SYS_SCHED_GETSCHEDULER, and SYS_SCHED_SETSCHEDULER. - Updated syscall handler to manage new scheduling-related syscalls and signal actions. Signed-off-by: kaguya <vpshinomiya@protonmail.com>
This commit is contained in:
+15
-3
@@ -31,6 +31,7 @@
|
||||
#include "arch/x86_64/sys/apic.h"
|
||||
#include "arch/x86_64/sys/ioapic.h"
|
||||
#include "drivers/input/ps2.h"
|
||||
#include "sched/scheduler.h"
|
||||
|
||||
|
||||
uintptr_t g_hhdm_offset;
|
||||
@@ -128,7 +129,7 @@ static uacpi_interrupt_ret handle_power_button(uacpi_handle ctx) {
|
||||
|
||||
|
||||
void kmain(void) {
|
||||
if (LIMINE_BASE_REVISION_SUPPORTED(limine_base_revision) == false) {
|
||||
if (LIMINE_BASE_REVISION_SUPPORTED(limine_base_revision) == false) {
|
||||
hcf();
|
||||
}
|
||||
|
||||
@@ -350,8 +351,19 @@ void kmain(void) {
|
||||
|
||||
|
||||
syscall_init();
|
||||
|
||||
sched_init();
|
||||
|
||||
start_userspace();
|
||||
|
||||
sched_yield();
|
||||
|
||||
|
||||
for (;;) {
|
||||
sched_yield();
|
||||
}
|
||||
|
||||
// We're done, just hang...
|
||||
hcf();
|
||||
}
|
||||
//hcf();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user