Kernel: Userspace signal handlers are now called one at a time

I added a syscall for telling the kernel when signal execution has
finished. We should send a random hash or id to the signal trampoline
that we would include in the syscall, so validity of signal exit can
be confirmed.
This commit is contained in:
2023-07-23 13:34:53 +03:00
parent d560137ae6
commit 2dce0a0415
9 changed files with 77 additions and 6 deletions
+1
View File
@@ -44,6 +44,7 @@ __BEGIN_DECLS
#define SYS_RAISE 37
#define SYS_KILL 38
#define SYS_SIGNAL 39
#define SYS_SIGNAL_DONE 40
__END_DECLS
+3
View File
@@ -286,6 +286,9 @@ long syscall(long syscall, ...)
ret = Kernel::syscall(SYS_SIGNAL, signal, (uintptr_t)handler);
break;
}
case SYS_SIGNAL_DONE:
// Should not be called by an user
// fall through
default:
puts("LibC: Unhandeled syscall");
ret = -ENOSYS;