thread: add kthreads
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
da53fa3871
commit
54803ed29b
6 changed files with 79 additions and 36 deletions
|
|
@ -12,6 +12,8 @@
|
|||
struct ehdr;
|
||||
struct phdr;
|
||||
|
||||
extern mem_cache_t *thread_slab;
|
||||
|
||||
#define THREAD_STATE_RUNNING 0
|
||||
#define THREAD_STATE_WAITING 1
|
||||
#define THREAD_STATE_DNS 2
|
||||
|
|
@ -74,6 +76,8 @@ void thread_mmap(struct thread *thread, paddr_t p, vaddr_t v, size_t len, u64 fl
|
|||
ssize_t thread_load_file(const char *file, struct thread *thread);
|
||||
struct thread *thread_create(void);
|
||||
struct thread *thread_fork(struct thread *parent);
|
||||
int thread_set_entry(struct thread *thread, uaddr_t entry);
|
||||
struct thread *thread_kthread(void (*fn)(void *), void *arg, const char *name);
|
||||
void thread_free(struct thread *thread);
|
||||
void thread_init();
|
||||
tid_t alloc_tid();
|
||||
|
|
|
|||
Loading…
Reference in a new issue