#include <config.h>
#include <corax/types.h>
+#include <corax/errno.h>
#include <debug.h>
#include "cpu.h"
#include "defs.h"
extern void _i8259_eoi(u32_t);
#endif /* CONFIG_APIC */
-int _int_handle(stack_frame_t ctx)
+void _int_handle(stack_frame_t ctx)
{
switch(ctx.intn) {
#if CONFIG_APIC == 1
break;
}
- return(0);
+ return;
}
-int _exc_handle(stack_frame_t ctx)
+void _exc_handle(stack_frame_t ctx)
{
dbg_printf("Exception %u [%s] occurred. Error code 0x%08x.\n", ctx.intn, ctx.intn < EXC_MAX ? _exc_name[ctx.intn] : 0, ctx.error);
dbg_printf("Fault in 0x%02x:%08x; EFLAGS = 0x%08x\n", ctx.cs, ctx.eip, ctx.eflags);
PANIC("Unhandled exception");
- return(0);
+ return;
}
-int _sys_handle(stack_frame_t ctx)
+void _sys_handle(stack_frame_t ctx)
{
+ int ret_val;
+
+ ret_val = -ENOSYS;
+
switch(ctx.intn) {
case SYS_VECTOR_CORAX:
dbg_printf("_corax_call(0x%x, 0x%x, 0x%x);\n", ctx.eax, ctx.ebx, ctx.ecx);
break;
}
- return(0);
+ ctx.eax = ret_val;
+
+ return;
}