SYS_abort_syscall (XCC)
[akaros.git] / kern / include / ros / bits / syscall.h
1 #ifndef ROS_INCLUDE_BITS_SYSCALL_H
2 #define ROS_INCLUDE_BITS_SYSCALL_H
3
4 /* system call numbers.  need to #def them for use in assembly.  Removing
5  * useless ones is okay, but if we change a number, we'll need to rebuild
6  * userspace (which is why we have holes). */
7 #define SYS_null                                         1
8 #define SYS_block                                        2
9 #define SYS_cache_invalidate             3
10 #define SYS_reboot                                       4
11 #define SYS_cputs                                        5
12 #define SYS_cgetc                                        6
13 #define SYS_getpcoreid                           7
14 #define SYS_getvcoreid                           8
15 #define SYS_getpid                                       9
16 #define SYS_proc_create                         10
17 #define SYS_proc_run                            11
18 #define SYS_proc_destroy                        12
19 #define SYS_yield                                       13
20 #define SYS_change_vcore                        14
21 #define SYS_fork                                        15
22 #define SYS_exec                                        16
23 #define SYS_waitpid                                     17
24 #define SYS_mmap                                        18
25 #define SYS_munmap                                      19
26 #define SYS_mprotect                            20
27 /* // these are the other mmap related calls, some of which we'll implement
28 #define SYS_mincore // can read page tables instead
29 #define SYS_madvise
30 #define SYS_mlock
31 #define SYS_msync
32 */
33 /* sys_brk removed */
34 #define SYS_shared_page_alloc           22
35 #define SYS_shared_page_free            23
36 #define SYS_provision                           24
37 #define SYS_notify                                      25
38 #define SYS_self_notify                         26
39 #define SYS_vc_entry                            31
40 #define SYS_halt_core                           27
41 #define SYS_init_arsc                           28
42 #define SYS_change_to_m                         29
43 #define SYS_poke_ksched                         30
44 #define SYS_abort_sysc                          31
45
46 /* Socket Syscalls */
47 #define SYS_socket                                      40
48 #define SYS_sendto                                      41
49 #define SYS_recvfrom                            42
50 #define SYS_select                                      43
51 #define SYS_connect                                     44
52 #define SYS_send                                        45
53 #define SYS_recv                                        46
54 #define SYS_bind                                        47
55 #define SYS_accept                                      48
56 #define SYS_listen                                      49
57
58 /* Platform specific syscalls */
59 #define SYS_serial_read                         75
60 #define SYS_serial_write                        76
61 #define SYS_eth_read                            77
62 #define SYS_eth_write                           78
63 #define SYS_eth_get_mac_addr            79
64 #define SYS_eth_recv_check                      80
65
66 /* FS Syscalls */
67 #define SYS_read                                100
68 #define SYS_write                               101
69 #define SYS_open                                102
70 #define SYS_close                               103
71 #define SYS_fstat                               104
72 #define SYS_stat                                105
73 #define SYS_lstat                               106
74 #define SYS_fcntl                               107
75 #define SYS_access                              108
76 #define SYS_umask                               109
77 #define SYS_chmod                               110
78 #define SYS_llseek                              111
79 #define SYS_link                                112
80 #define SYS_unlink                              113
81 #define SYS_symlink                             114
82 #define SYS_readlink                    115
83 #define SYS_chdir                               116
84 #define SYS_getcwd                              117
85 #define SYS_mkdir                               118
86 #define SYS_rmdir                               119
87 #define SYS_pipe                                120
88
89 /* Misc syscalls */
90 #define SYS_gettimeofday                140
91 #define SYS_tcgetattr                   141
92 #define SYS_tcsetattr                   142
93 #define SYS_setuid                              143
94 #define SYS_setgid                              144
95
96 /* Syscalls we plan to remove someday */
97 #define SYS_cache_buster        200 
98
99 /* For Buster Measurement Flags */
100 #define BUSTER_SHARED                   0x0001
101 #define BUSTER_STRIDED                  0x0002
102 #define BUSTER_LOCKED                   0x0004
103 #define BUSTER_PRINT_TICKS              0x0008
104 #define BUSTER_JUST_LOCKS               0x0010 // unimplemented
105
106 // for system calls that pass filenames
107 #define MAX_PATH_LEN 256
108
109 #endif /* !ROS_INCLUDE_SYSCALL_H */