xref: /minix3/minix/lib/libsys/sys_exec.c (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc #include "syslib.h"
2*433d6423SLionel Sambuc 
sys_exec(endpoint_t proc_ep,vir_bytes stack_ptr,vir_bytes progname,vir_bytes pc,vir_bytes ps_str)3*433d6423SLionel Sambuc int sys_exec(endpoint_t proc_ep, vir_bytes stack_ptr, vir_bytes progname,
4*433d6423SLionel Sambuc 	vir_bytes pc, vir_bytes ps_str)
5*433d6423SLionel Sambuc {
6*433d6423SLionel Sambuc /* A process has exec'd.  Tell the kernel. */
7*433d6423SLionel Sambuc 
8*433d6423SLionel Sambuc 	message m;
9*433d6423SLionel Sambuc 
10*433d6423SLionel Sambuc 	m.m_lsys_krn_sys_exec.endpt = proc_ep;
11*433d6423SLionel Sambuc 	m.m_lsys_krn_sys_exec.stack = stack_ptr;
12*433d6423SLionel Sambuc 	m.m_lsys_krn_sys_exec.name = progname;
13*433d6423SLionel Sambuc 	m.m_lsys_krn_sys_exec.ip = pc;
14*433d6423SLionel Sambuc 	m.m_lsys_krn_sys_exec.ps_str = ps_str;
15*433d6423SLionel Sambuc 
16*433d6423SLionel Sambuc 	return _kernel_call(SYS_EXEC, &m);
17*433d6423SLionel Sambuc }
18