kernel: trap-dependent state restore, trace fixes
[minix.git] / kernel / system / do_abort.c
blobc95a5d28e1d88861f641ab1d311ab41b7b210d0d
1 /* The kernel call implemented in this file:
2 * m_type: SYS_ABORT
4 * The parameters for this kernel call are:
5 * m1_i1: ABRT_HOW (how to abort, possibly fetch monitor params)
6 */
8 #include "kernel/system.h"
9 #include <unistd.h>
11 #if USE_ABORT
13 /*===========================================================================*
14 * do_abort *
15 *===========================================================================*/
16 int do_abort(struct proc * caller, message * m_ptr)
18 /* Handle sys_abort. MINIX is unable to continue. This can originate e.g.
19 * in the PM (normal abort) or TTY (after CTRL-ALT-DEL).
21 int how = m_ptr->ABRT_HOW;
23 /* Now prepare to shutdown MINIX. */
24 prepare_shutdown(how);
25 return(OK); /* pro-forma (really EDISASTER) */
28 #endif /* USE_ABORT */