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

#include <stdint.h>

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

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