Xen Ring Buffers
[akaros.git] / inc / syscall.h
1 #ifndef ROS_INC_SYSCALL_H
2 #define ROS_INC_SYSCALL_H
3
4 #include <inc/types.h>
5 #include <inc/ring_buffer.h>
6
7 /* system call numbers */
8 enum
9 {
10         SYS_cputs = 0,
11         SYS_cgetc,
12         SYS_getenvid,
13         SYS_env_destroy,
14         NSYSCALLS
15 };
16
17 #define NUM_SYS_ARGS 6
18 typedef struct SyscallRequest {
19         uint32_t num;
20         uint32_t flags;
21         uint32_t args[NUM_SYS_ARGS];
22 } syscall_req_t;
23
24 typedef struct SyscallResponse {
25         uint32_t retval;
26 } syscall_resp_t;
27
28
29 // Generic Syscall Ring Buffer
30 DEFINE_RING_TYPES(syscall, syscall_req_t, syscall_resp_t);
31
32 #endif /* !ROS_INC_SYSCALL_H */