1
0
Fork 0
mirror of https://github.com/tailix/kernel.git synced 2024-10-30 12:03:52 -04:00
kernel/arch/syscall.c

15 lines
429 B
C
Raw Normal View History

2017-11-05 04:50:04 -05:00
#include "kprintf.h"
struct IsrRegisters {
unsigned int ds; // Data segment selector
unsigned int edi, esi, ebp, esp, ebx, edx, ecx, eax; // Pushed by pusha.
unsigned int eip, cs, eflags, useresp, ss; // Pushed by the processor automatically.
};
void syscall_handler(struct IsrRegisters regs)
{
const unsigned int id = regs.eax;
kprintf("syscall %u\n", id);
}