Message type for SYS_CLEAR
Change-Id: I3d894edcf672d180aee38fd84bd06339bdf7fa9b
This commit is contained in:
parent
886c867c38
commit
5277fbe9f6
4 changed files with 12 additions and 7 deletions
|
@ -351,9 +351,6 @@
|
||||||
#define SYS_PRIV_UPDATE_SYS 9 /* Update a sys privilege structure. */
|
#define SYS_PRIV_UPDATE_SYS 9 /* Update a sys privilege structure. */
|
||||||
#define SYS_PRIV_YIELD 10 /* Allow process to run and suspend */
|
#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. */
|
/* Constants for exec. FIXME: these do not belong here. */
|
||||||
#define PMEF_AUXVECTORS 20
|
#define PMEF_AUXVECTORS 20
|
||||||
#define PMEF_EXECNAMELEN1 PATH_MAX
|
#define PMEF_EXECNAMELEN1 PATH_MAX
|
||||||
|
|
|
@ -707,6 +707,13 @@ typedef struct {
|
||||||
} mess_lsys_krn_sys_abort;
|
} mess_lsys_krn_sys_abort;
|
||||||
_ASSERT_MSG_SIZE(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 {
|
typedef struct {
|
||||||
endpoint_t src_endpt;
|
endpoint_t src_endpt;
|
||||||
vir_bytes src_addr;
|
vir_bytes src_addr;
|
||||||
|
@ -1694,6 +1701,7 @@ typedef struct {
|
||||||
mess_lsys_krn_schedctl m_lsys_krn_schedctl;
|
mess_lsys_krn_schedctl m_lsys_krn_schedctl;
|
||||||
mess_lsys_krn_schedule m_lsys_krn_schedule;
|
mess_lsys_krn_schedule m_lsys_krn_schedule;
|
||||||
mess_lsys_krn_sys_abort m_lsys_krn_sys_abort;
|
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_copy m_lsys_krn_sys_copy;
|
||||||
mess_lsys_krn_sys_exec m_lsys_krn_sys_exec;
|
mess_lsys_krn_sys_exec m_lsys_krn_sys_exec;
|
||||||
mess_lsys_krn_sys_fork m_lsys_krn_sys_fork;
|
mess_lsys_krn_sys_fork m_lsys_krn_sys_fork;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* m_type: SYS_CLEAR
|
* m_type: SYS_CLEAR
|
||||||
*
|
*
|
||||||
* The parameters for this kernel call are:
|
* 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"
|
#include "kernel/system.h"
|
||||||
|
@ -26,7 +26,8 @@ int do_clear(struct proc * caller, message * m_ptr)
|
||||||
int exit_p;
|
int exit_p;
|
||||||
int i;
|
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;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
rc = proc_addr(exit_p); /* clean up */
|
rc = proc_addr(exit_p); /* clean up */
|
||||||
|
@ -77,4 +78,3 @@ int do_clear(struct proc * caller, message * m_ptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* USE_CLEAR */
|
#endif /* USE_CLEAR */
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,6 @@ endpoint_t proc_ep; /* which process has exited */
|
||||||
*/
|
*/
|
||||||
message m;
|
message m;
|
||||||
|
|
||||||
m.PR_ENDPT = proc_ep;
|
m.m_lsys_krn_sys_clear.endpt = proc_ep;
|
||||||
return(_kernel_call(SYS_CLEAR, &m));
|
return(_kernel_call(SYS_CLEAR, &m));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue