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:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user