summaryrefslogtreecommitdiff
path: root/src/kernel/task/syscall.c
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-04 20:06:37 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-04 20:06:37 +0200
commit277e4af4fa9e80816c809542d792ee6bebb7f202 (patch)
tree9abb7f207d185909427137e4861b81c057de1259 /src/kernel/task/syscall.c
parente9683297bf480f9590b0e5796f4520fb430e2e03 (diff)
downloadTCE-277e4af4fa9e80816c809542d792ee6bebb7f202.tar.gz
TCE-277e4af4fa9e80816c809542d792ee6bebb7f202.zip
Migration to C++!
Diffstat (limited to 'src/kernel/task/syscall.c')
-rw-r--r--src/kernel/task/syscall.c45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/kernel/task/syscall.c b/src/kernel/task/syscall.c
deleted file mode 100644
index bd27eba..0000000
--- a/src/kernel/task/syscall.c
+++ /dev/null
@@ -1,45 +0,0 @@
-#include "syscall.h"
-#include "task.h"
-#include <core/sys.h>
-
-#define CALL0(name, scname) static void scname(struct registers* r) { r->eax = name(); }
-#define CALL1(name, scname) static void scname(struct registers* r) { \
- r->eax = name(r->ebx); }
-#define CALL2(name, scname) static void scname(struct registers* r) { \
- r->eax = name(r->ebx, r->ecx); }
-#define CALL3(name, scname) static void scname(struct registers* r) { \
- r->eax = name(r->ebx, r->ecx, r->edx); }
-#define CALL0V(name, scname) static void scname(struct registers* r) { name(); }
-#define CALL1V(name, scname) static void scname(struct registers* r) { name(r->ebx); }
-#define CALL2V(name, scname) static void scname(struct registers* r) { name(r->ebx, r->ecx); }
-#define CALL3V(name, scname) static void scname(struct registers* r) { name(r->ebx, r->ecx, r->edx); }
-#define CALL4V(name, scname) static void scname(struct registers* r) { name(r->ebx, r->ecx, r->edx, r->esi); }
-
-CALL0V(thread_exit, thread_exit_sc);
-CALL0V(schedule, schedule_sc);
-CALL1V(thread_sleep, thread_sleep_sc);
-CALL1V(process_exit, process_exit_sc);
-CALL1(monitor_write, printk_sc);
-CALL1V(idt_waitIrq, irq_wait_sc);
-CALL0(proc_priv, proc_priv_sc);
-CALL1(process_sbrk, proc_sbrk_sc);
-CALL1V(process_brk, proc_brk_sc);
-
-static void thread_new_sc(struct registers* r) {
- cli();
- thread_new(current_thread->process, (thread_entry)r->ebx, (void*)r->ecx, (void*)r->edx);
- sti();
-}
-
-int_callback syscalls[NUMBER_OF_SYSCALLS] = {
- thread_exit_sc, //0
- schedule_sc,
- thread_sleep_sc,
- process_exit_sc,
- printk_sc,
- thread_new_sc, //5
- irq_wait_sc,
- proc_priv_sc,
- proc_sbrk_sc,
- proc_brk_sc,
- 0 };