summaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-17 09:55:40 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-17 09:55:40 +0200
commitb6924d994ccdbe86ea67351d3c94600e14f5ed1f (patch)
tree09da2238bf96c638d12baca36afa9a3fde8979df /src/kernel
parent0a64a7b2817fb56bbc4640e27a484eb479e0bb22 (diff)
downloadTCE-b6924d994ccdbe86ea67351d3c94600e14f5ed1f.tar.gz
TCE-b6924d994ccdbe86ea67351d3c94600e14f5ed1f.zip
Nothing, just reverted some shit.
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/task/syscall.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/kernel/task/syscall.cpp b/src/kernel/task/syscall.cpp
index 7938e76..678677d 100644
--- a/src/kernel/task/syscall.cpp
+++ b/src/kernel/task/syscall.cpp
@@ -6,16 +6,16 @@
#define CALL0(name, scname) static void scname(registers* r) { r->eax = name(); }
#define CALL1(name, scname) static void scname(registers* r) { \
- r->eax = name(r->ecx); }
+ r->eax = name(r->ebx); }
#define CALL2(name, scname) static void scname(registers* r) { \
- r->eax = name(r->ecx, r->edx); }
+ r->eax = name(r->ebx, r->ecx); }
#define CALL3(name, scname) static void scname(registers* r) { \
- r->eax = name(r->ecx, r->edx, r->esi); }
+ r->eax = name(r->ebx, r->ecx, r->edx); }
#define CALL0V(name, scname) static void scname(registers* r) { name(); }
-#define CALL1V(name, scname) static void scname(registers* r) { name(r->ecx); }
-#define CALL2V(name, scname) static void scname(registers* r) { name(r->ecx, r->edx); }
-#define CALL3V(name, scname) static void scname(registers* r) { name(r->ecx, r->edx, r->esi); }
-#define CALL4V(name, scname) static void scname(registers* r) { name(r->ecx, r->edx, r->esi, r->edi); }
+#define CALL1V(name, scname) static void scname(registers* r) { name(r->ebx); }
+#define CALL2V(name, scname) static void scname(registers* r) { name(r->ebx, r->ecx); }
+#define CALL3V(name, scname) static void scname(registers* r) { name(r->ebx, r->ecx, r->edx); }
+#define CALL4V(name, scname) static void scname(registers* r) { name(r->ebx, r->ecx, r->edx, r->esi); }
CALL0V(thread_exit, thread_exit_sc);
CALL0V(schedule, schedule_sc);
@@ -27,12 +27,12 @@ CALL1(process_sbrk, proc_sbrk_sc);
CALL1V(process_brk, proc_brk_sc);
static void printk_sc(registers *r) {
- monitor_write((char*)r->ecx);
+ monitor_write((char*)r->ebx);
}
static void thread_new_sc(registers* r) {
cli();
- new thread(current_thread->process, (thread_entry)r->ecx, (void*)r->edx, (void*)r->esi);
+ new thread(current_thread->process, (thread_entry)r->ebx, (void*)r->ecx, (void*)r->edx);
sti();
}
@@ -54,11 +54,7 @@ int_callback syscalls[NUMBER_OF_SYSCALLS] = { // This must correspond to common
/* Called in idt_.asm on a system call (interrupt 64).
Calls the correct syscall handler (if any). */
extern "C" void idt_syscallHandler(registers regs) {
- if (regs.eax == 0) {
- if (regs.ebx < NUMBER_OF_SYSCALLS && syscalls[regs.ebx] != 0) {
- syscalls[regs.ebx](&regs);
- }
- } else {
- monitor_write("Hello. Object calls not implemented.\n");
+ if (regs.eax < NUMBER_OF_SYSCALLS && syscalls[regs.eax] != 0) {
+ syscalls[regs.eax](&regs);
}
}