From: Lionel Sambuc Date: Wed, 21 May 2014 14:52:18 +0000 (+0200) Subject: Message type for SYS_ABORT X-Git-Tag: v3.3.0~226 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/expt.png?a=commitdiff_plain;h=e412a582093ecff2ba5937b5e674bfa37d30b4de;p=minix.git Message type for SYS_ABORT Change-Id: Ic24a4779cc7955cb94f81fec58a358057ca85cb1 --- diff --git a/include/minix/com.h b/include/minix/com.h index 4b3f5253b..1e9a9ba19 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -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 */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 4a9e728ce..c3c7053cc 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -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; diff --git a/kernel/system/do_abort.c b/kernel/system/do_abort.c index c95a5d28e..64e9d57db 100644 --- a/kernel/system/do_abort.c +++ b/kernel/system/do_abort.c @@ -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); diff --git a/lib/libsys/sys_abort.c b/lib/libsys/sys_abort.c index a9403e54f..547bd9d3c 100644 --- a/lib/libsys/sys_abort.c +++ b/lib/libsys/sys_abort.c @@ -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)); }