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:
parent
33a9b2a3c3
commit
f033416893
13 changed files with 36 additions and 73 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue