diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-07 18:12:55 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-07 18:12:55 +0300 |
| commit | fe4c623cb9320226866829317cea8ba0c49e7dbc (patch) | |
| tree | 7ea3723077c72ff7969747a70ece0b94d88d2219 /src/proc.c | |
| parent | d592abd8ccc4026c51e196777031eb65c4acc4de (diff) | |
| download | kmi-fe4c623cb9320226866829317cea8ba0c49e7dbc.tar.gz kmi-fe4c623cb9320226866829317cea8ba0c49e7dbc.zip | |
make executable entrypoint universal callback
+ Effectively means that all executables can be called into, but if an
exe doesn't want to deal with anyone else it should just set a flag
like `not_really_a_server` or whatever
Diffstat (limited to 'src/proc.c')
| -rw-r--r-- | src/proc.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -24,6 +24,7 @@ stat_t prepare_proc(struct tcb *t, vm_t bin, vm_t interp) if (!entry) return ERR_INVAL; + t->callback = entry; alloc_stack(t); set_thread(t); set_return(t, entry); @@ -61,10 +62,6 @@ stat_t init_proc(void *fdt, vm_t *proc_fdt, vm_t *proc_initrd) stat_t ret = prepare_proc(t, get_init_base(fdt), 0); assert(ret == OK); - /** In the init process, can the entry be the callback? Is that too - * unergonomic? */ - t->callback = t->exec; - /** \todo start one thread per core, with special handling for init in * that each thread starts at the entry point of init? */ |
