diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-12-03 20:18:36 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-12-03 20:18:36 +0100 |
commit | 45afcc68979b700bdef1dc0e27ba79e0822b1c18 (patch) | |
tree | eb095c4f47b97996618589d9b9c4859c1a124155 /i386 | |
parent | 9518a5e29e6774fb66821140c916522abb985eaf (diff) | |
download | gnumach-45afcc68979b700bdef1dc0e27ba79e0822b1c18.tar.gz gnumach-45afcc68979b700bdef1dc0e27ba79e0822b1c18.tar.bz2 gnumach-45afcc68979b700bdef1dc0e27ba79e0822b1c18.zip |
task: Add task_set_essential
Whenever a Hurd essential task crashes, startup just reboots the system
since there's not much that can be done at that point. When we have a
kernel debugger, however, we could at least get crashing information, so
let's let Hurd's startup tell the kernel which tasks are essential, and
trigger the debugger whenever they crash.
Diffstat (limited to 'i386')
-rw-r--r-- | i386/i386/trap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/i386/i386/trap.c b/i386/i386/trap.c index eef9432f..6e446ab0 100644 --- a/i386/i386/trap.c +++ b/i386/i386/trap.c @@ -565,11 +565,12 @@ int user_trap(struct i386_saved_state *regs) } #if MACH_TTD - if (debug_all_traps_with_kttd && kttd_trap(type, regs->err, regs)) + if ((debug_all_traps_with_kttd || thread->task->essential) && + kttd_trap(type, regs->err, regs)) return 0; #endif /* MACH_TTD */ #if MACH_KDB - if (debug_all_traps_with_kdb && + if ((debug_all_traps_with_kdb || thread->task->essential) && kdb_trap(type, regs->err, regs)) return 0; #endif /* MACH_KDB */ |