mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
committed by
Andreas Kling
parent
33a9b2a3c3
commit
f033416893
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user