proc: enter into userspace
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
1a8061e3b3
commit
cd916f624b
12 changed files with 138 additions and 29 deletions
|
|
@ -37,7 +37,6 @@ struct thread {
|
|||
size_t stack_size;
|
||||
|
||||
u64 state;
|
||||
bool in_kernel;
|
||||
|
||||
u64 tls_base;
|
||||
|
||||
|
|
@ -61,13 +60,16 @@ struct proc {
|
|||
spinlock_t alloc_lock;
|
||||
rbtree_t alloc_map;
|
||||
|
||||
uaddr_t entry;
|
||||
|
||||
struct ehdr *ehdr;
|
||||
struct phdrs *phdrs;
|
||||
struct phdr *phdrs;
|
||||
size_t n_phdrs;
|
||||
};
|
||||
|
||||
int proc_kill(struct proc *proc, int signal);
|
||||
void proc_mmap(struct proc *proc, paddr_t p, vaddr_t v, size_t len, u64 flags);
|
||||
ssize_t proc_load_file(const char *file, struct proc *proc);
|
||||
struct proc *proc_create(struct proc *parent);
|
||||
void proc_free(struct proc *proc);
|
||||
void switch_to(struct thread *from, struct thread *to);
|
||||
|
|
|
|||
Loading…
Reference in a new issue