Message type for SYS_ABORT

Change-Id: Ic24a4779cc7955cb94f81fec58a358057ca85cb1
This commit is contained in:
Lionel Sambuc 2014-05-21 16:52:18 +02:00
parent b3085e334c
commit e412a58209
4 changed files with 11 additions and 6 deletions

View file

@ -310,9 +310,6 @@
# define IRQ_WORD 0x200 /* word values */
# define IRQ_LONG 0x400 /* long values */
/* Field names for SYS_ABORT. */
#define ABRT_HOW m1_i1 /* RBT_REBOOT, RBT_HALT, etc. */
/* Field names for SYS_IOPENABLE. */
#define IOP_ENDPT m2_l1 /* target endpoint */

View file

@ -700,6 +700,13 @@ typedef struct {
} mess_lsys_krn_schedctl;
_ASSERT_MSG_SIZE(mess_lsys_krn_schedctl);
typedef struct {
int how;
uint8_t padding[52];
} mess_lsys_krn_sys_abort;
_ASSERT_MSG_SIZE(mess_lsys_krn_sys_abort);
typedef struct {
int request;
int vector;
@ -1481,6 +1488,7 @@ typedef struct {
mess_lsys_krn_schedctl m_lsys_krn_schedctl;
mess_lsys_krn_schedule m_lsys_krn_schedule;
mess_lsys_krn_sys_abort m_lsys_krn_sys_abort;
mess_lsys_krn_sys_irqctl m_lsys_krn_sys_irqctl;
mess_lsys_krn_sys_memset m_lsys_krn_sys_memset;
mess_lsys_krn_sys_sdevio m_lsys_krn_sys_sdevio;

View file

@ -2,7 +2,7 @@
* m_type: SYS_ABORT
*
* The parameters for this kernel call are:
* m1_i1: ABRT_HOW (how to abort, possibly fetch monitor params)
* m_lsys_krn_sys_abort.how (how to abort, possibly fetch monitor params)
*/
#include "kernel/system.h"
@ -18,7 +18,7 @@ int do_abort(struct proc * caller, message * m_ptr)
/* Handle sys_abort. MINIX is unable to continue. This can originate e.g.
* in the PM (normal abort) or TTY (after CTRL-ALT-DEL).
*/
int how = m_ptr->ABRT_HOW;
int how = m_ptr->m_lsys_krn_sys_abort.how;
/* Now prepare to shutdown MINIX. */
prepare_shutdown(how);

View file

@ -8,6 +8,6 @@ int sys_abort(int how)
message m;
m.ABRT_HOW = how;
m.m_lsys_krn_sys_abort.how = how;
return(_kernel_call(SYS_ABORT, &m));
}