diff options
author | Alexis211 <alexis211@gmail.com> | 2010-03-23 16:34:36 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2010-03-23 16:34:36 +0100 |
commit | cbadacbb881200b601c7b53b29aa0c1b78747692 (patch) | |
tree | c3230c4d2dc8f75d126826954b80a37770ad26c7 /src/library/grapes | |
parent | 6266a24cd2f71a0bad0e55c1eedd480790868c0f (diff) | |
download | TCE-cbadacbb881200b601c7b53b29aa0c1b78747692.tar.gz TCE-cbadacbb881200b601c7b53b29aa0c1b78747692.zip |
More work on IPC
Diffstat (limited to 'src/library/grapes')
-rw-r--r-- | src/library/grapes/syscall.c | 35 | ||||
-rw-r--r-- | src/library/grapes/syscall.h | 12 |
2 files changed, 0 insertions, 47 deletions
diff --git a/src/library/grapes/syscall.c b/src/library/grapes/syscall.c deleted file mode 100644 index 38adc01..0000000 --- a/src/library/grapes/syscall.c +++ /dev/null @@ -1,35 +0,0 @@ -#include "syscall.h" - -static int call(unsigned a, unsigned b, unsigned c, unsigned d, unsigned e, unsigned f) { - unsigned ret; - asm volatile("int $64" : "=a"(ret) : "a"(a), "b"(b), "c"(c), "d"(d), "S"(e), "D"(f)); - return ret; -} - -void thread_exit() { - call(0, 0, 0, 0, 0, 0); -} - -void schedule() { - call(1, 0, 0,0, 0, 0); -} - -void thread_sleep(int time) { - call(2, time, 0, 0, 0, 0); -} - -void process_exit(int retval) { - call(3, retval, 0, 0, 0, 0); -} - -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); -} - -void irq_wait(int number) { - call(6, number, 0, 0, 0, 0); -} diff --git a/src/library/grapes/syscall.h b/src/library/grapes/syscall.h deleted file mode 100644 index d2f80e5..0000000 --- a/src/library/grapes/syscall.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef DEF_SYSCALL_H -#define DEF_SYSCALL_H - -void thread_exit(); -void schedule(); -void thread_sleep(int time); -void process_exit(int retval); -void printk(char* str); -void thread_new(void (*entry)(void*), void *data); -void irq_wait(int number); - -#endif |