syscall.hpp 283 B

1234567891011
  1. #pragma once
  2. #include <types/types.h>
  3. #include <kernel/interrupt.h>
  4. // return value is stored in %eax and %edx
  5. typedef void (*syscall_handler)(interrupt_stack* data);
  6. #define syscall(eax) asm volatile("movl %0, %%eax\n\tint $0x80"::"r"(eax):"eax","edx")
  7. void init_syscall(void);