diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-05-24 23:28:37 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-05-24 23:28:37 +0300 |
| commit | 018624dd5b1692b88f7b2e85652ea7b898043b6d (patch) | |
| tree | 0aa018640dc6bd5ebca7120df95dca4269be61d6 /include/apos | |
| parent | 4123ec776d3769728e1e12379887da34c12ee8f8 (diff) | |
| download | kmi-018624dd5b1692b88f7b2e85652ea7b898043b6d.tar.gz kmi-018624dd5b1692b88f7b2e85652ea7b898043b6d.zip | |
make process loading more generic
Diffstat (limited to 'include/apos')
| -rw-r--r-- | include/apos/conf.h | 2 | ||||
| -rw-r--r-- | include/apos/mem_regions.h | 1 | ||||
| -rw-r--r-- | include/apos/proc.h | 4 | ||||
| -rw-r--r-- | include/apos/tcb.h | 8 |
4 files changed, 6 insertions, 9 deletions
diff --git a/include/apos/conf.h b/include/apos/conf.h index 2b861dc..c2653cd 100644 --- a/include/apos/conf.h +++ b/include/apos/conf.h @@ -9,7 +9,7 @@ #include <apos/types.h> -extern size_t __proc_stack_size; +extern size_t __thread_stack_size; extern size_t __call_stack_size; #endif /* APOS_CONF_H */ diff --git a/include/apos/mem_regions.h b/include/apos/mem_regions.h index c9c4a5c..54e4e2b 100644 --- a/include/apos/mem_regions.h +++ b/include/apos/mem_regions.h @@ -21,7 +21,6 @@ struct mem_region_root { struct sp_root free_regions; struct sp_root used_regions; - struct mem_region *first; }; struct mem_region { diff --git a/include/apos/proc.h b/include/apos/proc.h index 6b4044d..182ae16 100644 --- a/include/apos/proc.h +++ b/include/apos/proc.h @@ -10,7 +10,7 @@ #include <apos/tcb.h> #include <apos/vmem.h> -stat_t jump_to_userspace(struct tcb *t, int argc, char **argv); -stat_t init_proc(void *fdt, struct vmem *b); +stat_t prepare_proc(struct tcb *t, vm_t bin, vm_t interp); +stat_t init_proc(void *fdt); #endif /* APOS_PROC_H */ diff --git a/include/apos/tcb.h b/include/apos/tcb.h index 572041d..2b602f6 100644 --- a/include/apos/tcb.h +++ b/include/apos/tcb.h @@ -32,15 +32,12 @@ struct tcb { vm_t callback; - vm_t proc_stack; - vm_t proc_stack_top; + vm_t thread_stack; + vm_t thread_stack_top; vm_t call_stack; vm_t call_stack_top; - /* entry point */ - vm_t entry; - /* vm root branch */ struct vmem *b_r; @@ -63,5 +60,6 @@ void use_tcb(struct tcb *); struct tcb *get_tcb(id_t tid); stat_t clone_tcb_maps(struct tcb *); +stat_t alloc_stacks(struct tcb *); #endif /* APOS_TCB_H */ |
