x86: cleans up syscalls, fixes pop_ros_tf() (XCC)
[akaros.git] / kern / arch / i686 / ros / syscall.h
1 #ifndef _ROS_ARCH_SYSCALL_H
2 #define _ROS_ARCH_SYSCALL_H
3
4 #define T_SYSCALL       0x80
5
6 #ifndef ROS_KERNEL
7
8 #include <ros/arch/bits/syscall.h>
9
10 static inline long __ros_arch_syscall(long _a0, long _a1, long _a2, long _a3,
11                                       long _a4, long _a5)
12 {
13         #ifdef __CONFIG_SYSCALL_TRAP__
14                 return __syscall_trap(_a0, _a1);
15         #else
16                 return __syscall_sysenter(_a0, _a1);
17         #endif
18 }
19
20 #endif /* ifndef ROS_KERNEL */
21
22 #endif
23