From: Lionel Sambuc Date: Mon, 26 May 2014 10:12:11 +0000 (+0200) Subject: Message type for SYS_CLEAR X-Git-Tag: v3.3.0~210 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/named.html?a=commitdiff_plain;h=5277fbe9f65ad0474e2fd9b2b0befcf709eb21ad;p=minix.git Message type for SYS_CLEAR Change-Id: I3d894edcf672d180aee38fd84bd06339bdf7fa9b --- diff --git a/include/minix/com.h b/include/minix/com.h index 3c30633c4..3bde3d3ad 100644 --- a/include/minix/com.h +++ b/include/minix/com.h @@ -351,9 +351,6 @@ #define SYS_PRIV_UPDATE_SYS 9 /* Update a sys privilege structure. */ #define SYS_PRIV_YIELD 10 /* Allow process to run and suspend */ -/* Field names for SYS_FORK, _EXEC, _EXIT, GETMCONTEXT, SETMCONTEXT.*/ -#define PR_ENDPT m1_i1 /* indicates a process */ - /* Constants for exec. FIXME: these do not belong here. */ #define PMEF_AUXVECTORS 20 #define PMEF_EXECNAMELEN1 PATH_MAX diff --git a/include/minix/ipc.h b/include/minix/ipc.h index fc0f2f3f8..ee423e56a 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -707,6 +707,13 @@ typedef struct { } mess_lsys_krn_sys_abort; _ASSERT_MSG_SIZE(mess_lsys_krn_sys_abort); +typedef struct { + endpoint_t endpt; + + uint8_t padding[52]; +} mess_lsys_krn_sys_clear; +_ASSERT_MSG_SIZE(mess_lsys_krn_sys_clear); + typedef struct { endpoint_t src_endpt; vir_bytes src_addr; @@ -1694,6 +1701,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_clear m_lsys_krn_sys_clear; mess_lsys_krn_sys_copy m_lsys_krn_sys_copy; mess_lsys_krn_sys_exec m_lsys_krn_sys_exec; mess_lsys_krn_sys_fork m_lsys_krn_sys_fork; diff --git a/kernel/system/do_clear.c b/kernel/system/do_clear.c index 5a9abf9a5..372b28f89 100644 --- a/kernel/system/do_clear.c +++ b/kernel/system/do_clear.c @@ -2,7 +2,7 @@ * m_type: SYS_CLEAR * * The parameters for this kernel call are: - * m1_i1: PR_ENDPT (endpoint of process to clean up) + * m_lsys_krn_sys_clear.endpt (endpoint of process to clean up) */ #include "kernel/system.h" @@ -26,7 +26,8 @@ int do_clear(struct proc * caller, message * m_ptr) int exit_p; int i; - if(!isokendpt(m_ptr->PR_ENDPT, &exit_p)) { /* get exiting process */ + if(!isokendpt(m_ptr->m_lsys_krn_sys_clear.endpt, &exit_p)) { + /* get exiting process */ return EINVAL; } rc = proc_addr(exit_p); /* clean up */ @@ -77,4 +78,3 @@ int do_clear(struct proc * caller, message * m_ptr) } #endif /* USE_CLEAR */ - diff --git a/lib/libsys/sys_clear.c b/lib/libsys/sys_clear.c index e5f9a25a7..296eb3c49 100644 --- a/lib/libsys/sys_clear.c +++ b/lib/libsys/sys_clear.c @@ -10,6 +10,6 @@ endpoint_t proc_ep; /* which process has exited */ */ message m; - m.PR_ENDPT = proc_ep; + m.m_lsys_krn_sys_clear.endpt = proc_ep; return(_kernel_call(SYS_CLEAR, &m)); }