From: Lionel Sambuc Date: Tue, 13 May 2014 11:22:52 +0000 (+0200) Subject: Message type for PM_EXEC_RESTART X-Git-Tag: v3.3.0~289 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/Bv9ARM.ch02.html?a=commitdiff_plain;h=7fb63c6182d4343e5ccf989b2b6fbd98a5521cd9;p=minix.git Message type for PM_EXEC_RESTART Change-Id: I0b7abd7b20a56a7982bccd0f677c1cf9d6bf7d3b --- diff --git a/include/minix/callnr.h b/include/minix/callnr.h index 20c418b1f..060a3a65d 100644 --- a/include/minix/callnr.h +++ b/include/minix/callnr.h @@ -122,12 +122,6 @@ /* Field names for the reboot(2) call. */ #define PM_REBOOT_HOW m1_i1 /* int */ -/* Field names for the PM_EXEC_RESTART call. */ -#define PM_EXEC_RESTART_ENDPT m1_i1 /* endpoint_t */ -#define PM_EXEC_RESTART_RESULT m1_i2 /* int */ -#define PM_EXEC_RESTART_PC m1_p1 /* vir_bytes */ -#define PM_EXEC_RESTART_PS_STR m1_p2 /* vir_bytes */ - /*===========================================================================* * Calls to VFS * *===========================================================================*/ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index db144032d..f0331b14d 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -522,6 +522,16 @@ typedef struct { } mess_lsys_vfs_mapdriver; _ASSERT_MSG_SIZE(mess_lsys_vfs_mapdriver); +typedef struct { + endpoint_t endpt; + int result; + vir_bytes pc; + vir_bytes ps_str; + + uint8_t padding[40]; +} mess_rs_pm_exec_restart; +_ASSERT_MSG_SIZE(mess_rs_pm_exec_restart); + typedef struct { dev_t device; off_t seek_pos; @@ -1022,6 +1032,8 @@ typedef struct { mess_pm_lsys_getepinfo m_pm_lsys_getepinfo; mess_pm_lsys_getprocnr m_pm_lsys_getprocnr; + mess_rs_pm_exec_restart m_rs_pm_exec_restart; + mess_vfs_fs_breadwrite m_vfs_fs_breadwrite; mess_vfs_fs_chmod m_vfs_fs_chmod; mess_vfs_fs_chown m_vfs_fs_chown; diff --git a/servers/pm/exec.c b/servers/pm/exec.c index 4d7c142b3..b50d893c4 100644 --- a/servers/pm/exec.c +++ b/servers/pm/exec.c @@ -131,14 +131,14 @@ int do_execrestart(void) if (who_e != RS_PROC_NR) return EPERM; - proc_e = m_in.PM_EXEC_RESTART_ENDPT; + proc_e = m_in.m_rs_pm_exec_restart.endpt; if (pm_isokendpt(proc_e, &proc_n) != OK) { panic("do_execrestart: got bad endpoint: %d", proc_e); } rmp = &mproc[proc_n]; - result = m_in.PM_EXEC_RESTART_RESULT; - pc = (vir_bytes)m_in.PM_EXEC_RESTART_PC; - ps_str = (vir_bytes)m_in.PM_EXEC_RESTART_PS_STR; + result = m_in.m_rs_pm_exec_restart.result; + pc = m_in.m_rs_pm_exec_restart.pc; + ps_str = m_in.m_rs_pm_exec_restart.ps_str; exec_restart(rmp, result, pc, rmp->mp_frame_addr, ps_str); diff --git a/servers/rs/exec.c b/servers/rs/exec.c index 09e0b9a0b..f72d0e598 100644 --- a/servers/rs/exec.c +++ b/servers/rs/exec.c @@ -129,10 +129,10 @@ static int exec_restart(int proc_e, int result, vir_bytes pc, vir_bytes ps_str) memset(&m, 0, sizeof(m)); m.m_type = PM_EXEC_RESTART; - m.PM_EXEC_RESTART_ENDPT = proc_e; - m.PM_EXEC_RESTART_RESULT = result; - m.PM_EXEC_RESTART_PC = (void *)pc; - m.PM_EXEC_RESTART_PS_STR = (void *)ps_str; + m.m_rs_pm_exec_restart.endpt = proc_e; + m.m_rs_pm_exec_restart.result = result; + m.m_rs_pm_exec_restart.pc = pc; + m.m_rs_pm_exec_restart.ps_str = ps_str; r = ipc_sendrec(PM_PROC_NR, &m); if (r != OK)