2005-04-21 16:53:53 +02:00
|
|
|
#include "syslib.h"
|
|
|
|
|
2005-07-20 17:33:54 +02:00
|
|
|
PUBLIC int sys_exec(proc, ptr, prog_name, initpc)
|
2005-04-21 16:53:53 +02:00
|
|
|
int proc; /* process that did exec */
|
|
|
|
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;
|
|
|
|
|
|
|
|
m.PR_PROC_NR = proc;
|
|
|
|
m.PR_STACK_PTR = ptr;
|
|
|
|
m.PR_NAME_PTR = prog_name;
|
|
|
|
m.PR_IP_PTR = (char *)initpc;
|
|
|
|
return(_taskcall(SYSTASK, SYS_EXEC, &m));
|
|
|
|
}
|