diff options
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/sys/exec.h | 8 | ||||
-rw-r--r-- | sys/include/sys/proc.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/include/sys/exec.h b/sys/include/sys/exec.h index 73eae01..f5fac97 100644 --- a/sys/include/sys/exec.h +++ b/sys/include/sys/exec.h @@ -72,7 +72,15 @@ struct exec_prog { char **envp; }; +struct execve_args { + const char *pathname; + char **argv; + char **envp; +}; + +int execve(struct proc *td, const struct execve_args *args); int elf64_load(const char *pathname, struct proc *td, struct exec_prog *prog); + void elf_unload(struct proc *td, struct exec_prog *prog); void setregs(struct proc *td, struct exec_prog *prog, uintptr_t stack); diff --git a/sys/include/sys/proc.h b/sys/include/sys/proc.h index 0c3cd33..ba931f3 100644 --- a/sys/include/sys/proc.h +++ b/sys/include/sys/proc.h @@ -56,6 +56,8 @@ struct proc { }; #define PROC_EXITING BIT(0) /* Exiting */ +#define PROC_EXEC BIT(1) /* Exec called (cleared by sched) */ +#define PROC_INEXEC BIT(2) /* Exec in progress */ struct proc *this_td(void); int md_fork(struct proc *p, struct proc *parent, uintptr_t ip); |