diff options
Diffstat (limited to 'src/user/lib/thread.h')
-rw-r--r-- | src/user/lib/thread.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/user/lib/thread.h b/src/user/lib/thread.h index 0d7376a..5a5ddc0 100644 --- a/src/user/lib/thread.h +++ b/src/user/lib/thread.h @@ -1,4 +1,9 @@ #pragma once +#include <stdlib.h> -void thread_create(int flags, void (*fn)(void*), void *arg); -_Noreturn void chstack(void *arg, void (*fn)(void*), void *esp); +void thread_creates(int flags, void (*fn)(void*), void *arg, void *stack); + +static inline void thread_create(int flags, void (*fn)(void*), void *arg) { + /* error checking is for WIMPS. */ + thread_creates(flags, fn, arg, malloc(4096) + 4096); +} |