Added the null syscall and a userapp that exploits it.
[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_null = 1,
11         SYS_cputs,
12         SYS_cgetc,
13         SYS_getenvid,
14         SYS_env_destroy,
15 };
16 #define NSYSCALLS (SYS_env_destroy)
17
18 #define NUM_SYS_ARGS 6
19 typedef struct SyscallRequest {
20         uint32_t num;
21         uint32_t flags;
22         uint32_t args[NUM_SYS_ARGS];
23 } syscall_req_t;
24
25 typedef struct SyscallResponse {
26         uint32_t retval;
27 } syscall_resp_t;
28
29
30 // Generic Syscall Ring Buffer
31 DEFINE_RING_TYPES(syscall, syscall_req_t, syscall_resp_t);
32
33 #endif /* !ROS_INC_SYSCALL_H */