1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:58:12 +00:00

Kernel+LibC: Clean up how assertions work in the kernel and LibC

This also brings LibC's abort() function closer to the spec.
This commit is contained in:
Gunnar Beutner 2021-04-18 08:43:10 +02:00 committed by Andreas Kling
parent 33a9b2a3c3
commit f033416893
13 changed files with 36 additions and 73 deletions

View file

@ -99,7 +99,7 @@ KResultOr<FlatPtr> handle(RegisterState& regs, FlatPtr function, FlatPtr arg1, F
auto& process = current_thread->process();
current_thread->did_syscall();
if (function == SC_abort || function == SC_exit || function == SC_exit_thread) {
if (function == SC_exit || function == SC_exit_thread) {
// These syscalls need special handling since they never return to the caller.
if (auto* tracer = process.tracer(); tracer && tracer->is_tracing_syscalls()) {
@ -109,9 +109,6 @@ KResultOr<FlatPtr> handle(RegisterState& regs, FlatPtr function, FlatPtr arg1, F
}
switch (function) {
case SC_abort:
process.sys$abort();
break;
case SC_exit:
process.sys$exit(arg1);
break;