diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-06-01 22:34:31 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-06-01 22:34:31 +0300 |
| commit | b5e6a74635eba8e6c5fe0a614c6f578380fb1196 (patch) | |
| tree | 994be097e18720c0062014db255ad8c06538641a /include/apos/proc.h | |
| parent | 6295648f04d1d5d7e8b99d3fdaa8d497406eadf9 (diff) | |
| download | kmi-b5e6a74635eba8e6c5fe0a614c6f578380fb1196.tar.gz kmi-b5e6a74635eba8e6c5fe0a614c6f578380fb1196.zip | |
continue documentation
Diffstat (limited to 'include/apos/proc.h')
| -rw-r--r-- | include/apos/proc.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/apos/proc.h b/include/apos/proc.h index 182ae16..8eaa647 100644 --- a/include/apos/proc.h +++ b/include/apos/proc.h @@ -10,7 +10,25 @@ #include <apos/tcb.h> #include <apos/vmem.h> +/** + * Set up binary. Currently only supports ELF, not sure if other formats should + * be supported. + * + * @param t Thread space to set up process in. + * @param bin Address of binary to load. + * @param interp Optional interpreter, mainly for PIE ELF binaries. + * @return \ref OK on success, \ref ERR_INVAL if loading binary failed. + * @todo Handle out of memory better? + */ stat_t prepare_proc(struct tcb *t, vm_t bin, vm_t interp); + +/** + * Initialize process handling subsystem and setup \c init program. + * + * @param fdt Global FDT pointer. + * @return \ref ERR_OOMEM when out of memory, \ref ERR_INVAL if loading \c init + * failed, \ref OK otherwise. + */ stat_t init_proc(void *fdt); #endif /* APOS_PROC_H */ |
