summaryrefslogtreecommitdiff
path: root/src/library/grapes
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2010-02-09 17:48:38 +0100
committerAlexis211 <alexis211@gmail.com>2010-02-09 17:48:38 +0100
commit3e1998280319e8060e797ca39b3b0b1bc766d569 (patch)
tree045c5a3e7d12a499a8f107e1223ae6880600a8c1 /src/library/grapes
parent4886faa3dce410543eda2139221e03959e73a747 (diff)
downloadTCE-3e1998280319e8060e797ca39b3b0b1bc766d569.tar.gz
TCE-3e1998280319e8060e797ca39b3b0b1bc766d569.zip
Added thread_new syscall
Diffstat (limited to 'src/library/grapes')
-rw-r--r--src/library/grapes/syscall.c4
-rw-r--r--src/library/grapes/syscall.h1
2 files changed, 5 insertions, 0 deletions
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