aboutsummaryrefslogtreecommitdiff
path: root/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-16 00:13:02 -0400
committerIan Moffett <ian@osmora.org>2024-05-16 00:13:02 -0400
commit4d82697cc521c42cfd51bf8d617802c698ce5e31 (patch)
tree2feafbb29eb67550ddd0d46426fae7c7ec767eeb /sys/include
parent84da00bbc2bb8a93507179a404dfc91c630c6e96 (diff)
kernel: sched: Move loader code away from sched
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r--sys/include/sys/loader.h7
-rw-r--r--sys/include/sys/proc.h6
-rw-r--r--sys/include/sys/sched.h1
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/include/sys/loader.h b/sys/include/sys/loader.h
index 9b38a55..43ad36e 100644
--- a/sys/include/sys/loader.h
+++ b/sys/include/sys/loader.h
@@ -60,8 +60,15 @@ struct auxval {
uint64_t at_phnum;
};
+struct exec_args {
+ char **argp, **envp;
+ struct auxval auxv;
+ struct vas vas;
+};
+
#if defined(_KERNEL)
+uintptr_t loader_init_stack(void *stack_top, struct exec_args args);
int loader_unload(struct vas vas, struct vm_range *exec_range);
int loader_load(struct vas vas, const void *dataptr, struct auxval *auxv,
size_t load_base, char **ld_path, struct vm_range *prog_range);
diff --git a/sys/include/sys/proc.h b/sys/include/sys/proc.h
index 85dd912..ec7d25e 100644
--- a/sys/include/sys/proc.h
+++ b/sys/include/sys/proc.h
@@ -61,12 +61,6 @@
#define USER_TO_KERN(user) PHYS_TO_VIRT(user)
#define KERN_TO_USER(kern) VIRT_TO_PHYS(kern)
-struct exec_args {
- char **argp, **envp;
- struct auxval auxv;
- struct vas vas;
-};
-
enum {
ADDR_RANGE_EXEC = 0, /* Program address range */
ADDR_RANGE_STACK /* Stack address range */
diff --git a/sys/include/sys/sched.h b/sys/include/sys/sched.h
index 01a58fe..8245120 100644
--- a/sys/include/sys/sched.h
+++ b/sys/include/sys/sched.h
@@ -43,7 +43,6 @@ void sched_init(void);
void sched_exit(void);
void sched_context_switch(struct trapframe *tf);
void sched_rest(void);
-uintptr_t sched_init_stack(void *stack_top, struct exec_args args);
__noreturn
uint64_t sys_exit(struct syscall_args *args);