From 3e1998280319e8060e797ca39b3b0b1bc766d569 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Tue, 9 Feb 2010 17:48:38 +0100 Subject: Added thread_new syscall --- src/library/grapes/syscall.c | 4 ++++ src/library/grapes/syscall.h | 1 + 2 files changed, 5 insertions(+) (limited to 'src/library') diff --git a/src/library/grapes/syscall.c b/src/library/grapes/syscall.c index 5a1a26e..a00d9e8 100644 --- a/src/library/grapes/syscall.c +++ b/src/library/grapes/syscall.c @@ -25,3 +25,7 @@ void process_exit(int retval) { void printk(char* str) { call(4, (unsigned)str, 0, 0, 0, 0); } + +void thread_new(void (*entry)(void*), void *data) { + call(5, (unsigned)entry, (unsigned)data, 0, 0, 0); +} diff --git a/src/library/grapes/syscall.h b/src/library/grapes/syscall.h index 9f4c280..e385761 100644 --- a/src/library/grapes/syscall.h +++ b/src/library/grapes/syscall.h @@ -6,5 +6,6 @@ void schedule(); void thread_sleep(int time); void process_exit(int retval); void printk(char* str); +void thread_new(void (*entry)(void*), void *data); #endif -- cgit v1.2.3