aboutsummaryrefslogtreecommitdiff
path: root/src/user/syscall.c
blob: 3aa070722678cbf3083dc5ea8c8919b8c997bd77 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "user/syscall.h"

#include <stdint.h>

void __attribute__ ((noinline)) do_syscall(
    volatile uint32_t id,
    volatile uint32_t arg)
{
  asm volatile("svc #0x04");
}

#define SYSCALL(id, fn, kernfn, argt) \
  void fn(argt arg) \
{ \
  do_syscall(id, (uint32_t) arg); \
}
#include "kern/syscall/syscall_tbl.inc"