2005-04-21 16:53:53 +02:00
|
|
|
#include "syslib.h"
|
|
|
|
|
2012-03-25 20:25:53 +02:00
|
|
|
int sys_exec(proc_ep, ptr, prog_name, initpc)
|
2009-09-22 23:42:02 +02:00
|
|
|
endpoint_t proc_ep; /* process that did exec */
|
2005-04-21 16:53:53 +02:00
|
|
|
char *ptr; /* new stack pointer */
|
|
|
|
char *prog_name; /* name of the new program */
|
|
|
|
vir_bytes initpc;
|
|
|
|
{
|
|
|
|
/* A process has exec'd. Tell the kernel. */
|
|
|
|
|
|
|
|
message m;
|
|
|
|
|
2009-09-22 23:42:02 +02:00
|
|
|
m.PR_ENDPT = proc_ep;
|
2005-04-21 16:53:53 +02:00
|
|
|
m.PR_STACK_PTR = ptr;
|
|
|
|
m.PR_NAME_PTR = prog_name;
|
|
|
|
m.PR_IP_PTR = (char *)initpc;
|
2010-02-09 16:20:09 +01:00
|
|
|
return(_kernel_call(SYS_EXEC, &m));
|
2005-04-21 16:53:53 +02:00
|
|
|
}
|