sched: add POSIX signal support

We have added POSIX signals to KirkOS

It is very much experimental

Alongside, we have PCI support fully, and we have imported sbase coreutils, I'm not too sure if all of them work, likely not, but a good few should be okay.

Signed-off-by: kaguya <kaguya3311@national.shitposting.agency>
This commit is contained in:
kaguya
2026-05-19 00:48:13 -04:00
parent 19521c6ab4
commit db352f7ef4
137 changed files with 3314 additions and 223 deletions
+24 -1
View File
@@ -2,6 +2,7 @@
#include "fs/vfs.h"
#include "sched/sched_types.h"
#include "sched/sched.h"
#include "sched/signal.h"
#include "fs/tmpfs.h"
#include "fs/devtmpfs.h"
#include "libk/random.h"
@@ -9,6 +10,8 @@
#include "fs/partition.h"
#include "drivers/fb/fb.h"
#include "drivers/tty/console.h"
#include "drivers/input/input.h"
#include "drivers/ps2/ps2.h"
#include "arch/x86_64/sys/timer.h"
#include "libk/kargs.h"
#include "fs/ramdisk.h"
@@ -82,6 +85,26 @@ void kernel_main(void *args) {
syscall_register_handler(0x10f, syscall_ppoll);
syscall_register_handler(0x54, syscall_rmdir);
/* ── POSIX signal syscalls ──────────────────────────────────────── */
syscall_register_handler(13, syscall_sigaction); /* rt_sigaction */
syscall_register_handler(14, syscall_sigprocmask); /* rt_sigprocmask */
syscall_register_handler(15, syscall_sigreturn); /* rt_sigreturn */
syscall_register_handler(34, syscall_pause);
syscall_register_handler(127, syscall_sigpending);
syscall_register_handler(130, syscall_sigsuspend);
/* ── POSIX session / process-group syscalls ─────────────────────── */
syscall_register_handler(109, syscall_setpgid);
syscall_register_handler(111, syscall_getpgrp);
syscall_register_handler(112, syscall_setsid);
syscall_register_handler(121, syscall_getpgid);
syscall_register_handler(124, syscall_getsid);
/* ── Shared input ring buffer + PS/2 keyboard ───────────────────── */
input_init();
ps2_init();
kprintf("Halting for 5 seconds...");
timer_sleep(5000);
@@ -96,7 +119,7 @@ void kernel_main(void *args) {
NULL,
};
char *init_path = "/bin/oksh";
char *init_path = "/bin/sh";
if (kernel_arguments.kernel_args & KERNEL_ARGS_INIT_PATH_GIVEN) {
init_path = kernel_arguments.init_binary_path;
}