2005-04-21 16:53:53 +02:00
|
|
|
#include "syslib.h"
|
|
|
|
|
2013-09-13 20:12:22 +02:00
|
|
|
int sys_exec(endpoint_t proc_ep, char *stack_ptr, char *progname,
|
|
|
|
vir_bytes pc, vir_bytes ps_str)
|
2005-04-21 16:53:53 +02:00
|
|
|
{
|
|
|
|
/* A process has exec'd. Tell the kernel. */
|
|
|
|
|
2013-09-13 20:12:22 +02:00
|
|
|
message m;
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2013-09-13 20:12:22 +02:00
|
|
|
m.PR_ENDPT = proc_ep;
|
|
|
|
m.PR_STACK_PTR = stack_ptr;
|
|
|
|
m.PR_NAME_PTR = progname;
|
|
|
|
m.PR_IP_PTR = (char *)pc;
|
|
|
|
m.PR_PS_STR_PTR = (char *)ps_str;
|
|
|
|
|
|
|
|
return _kernel_call(SYS_EXEC, &m);
|
2005-04-21 16:53:53 +02:00
|
|
|
}
|