xref: /minix3/minix/kernel/system/do_abort.c (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc /* The kernel call implemented in this file:
2*433d6423SLionel Sambuc  *   m_type:	SYS_ABORT
3*433d6423SLionel Sambuc  *
4*433d6423SLionel Sambuc  * The parameters for this kernel call are:
5*433d6423SLionel Sambuc  *   m_lsys_krn_sys_abort.how 	(how to abort, possibly fetch monitor params)
6*433d6423SLionel Sambuc  */
7*433d6423SLionel Sambuc 
8*433d6423SLionel Sambuc #include "kernel/system.h"
9*433d6423SLionel Sambuc #include <unistd.h>
10*433d6423SLionel Sambuc 
11*433d6423SLionel Sambuc #if USE_ABORT
12*433d6423SLionel Sambuc 
13*433d6423SLionel Sambuc /*===========================================================================*
14*433d6423SLionel Sambuc  *				do_abort				     *
15*433d6423SLionel Sambuc  *===========================================================================*/
do_abort(struct proc * caller,message * m_ptr)16*433d6423SLionel Sambuc int do_abort(struct proc * caller, message * m_ptr)
17*433d6423SLionel Sambuc {
18*433d6423SLionel Sambuc /* Handle sys_abort. MINIX is unable to continue. This can originate e.g.
19*433d6423SLionel Sambuc  * in the PM (normal abort) or TTY (after CTRL-ALT-DEL).
20*433d6423SLionel Sambuc  */
21*433d6423SLionel Sambuc   int how = m_ptr->m_lsys_krn_sys_abort.how;
22*433d6423SLionel Sambuc 
23*433d6423SLionel Sambuc   /* Now prepare to shutdown MINIX. */
24*433d6423SLionel Sambuc   prepare_shutdown(how);
25*433d6423SLionel Sambuc   return(OK);				/* pro-forma (really EDISASTER) */
26*433d6423SLionel Sambuc }
27*433d6423SLionel Sambuc 
28*433d6423SLionel Sambuc #endif /* USE_ABORT */
29*433d6423SLionel Sambuc 
30