1 | /* |
---|
2 | * syscalls_numbers.c - Contains enum of the syscalls. |
---|
3 | * |
---|
4 | * Author Alain Greiner (2018) |
---|
5 | * |
---|
6 | * Copyright (c) UPMC Sorbonne Universites |
---|
7 | * |
---|
8 | * This file is part of ALMOS-MKH. |
---|
9 | * |
---|
10 | * ALMOS-MKH is free software; you can redistribute it and/or modify it |
---|
11 | * under the terms of the GNU General Public License as published by |
---|
12 | * the Free Software Foundation; version 2.0 of the License. |
---|
13 | * |
---|
14 | * ALMOS-MKH is distributed in the hope that it will be useful, but |
---|
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
17 | * General Public License for more details. |
---|
18 | * |
---|
19 | * You should have received a copy of the GNU General Public License |
---|
20 | * along with ALMOS-MKH; if not, write to the Free Software Foundation, |
---|
21 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
22 | */ |
---|
23 | |
---|
24 | #ifndef _SYSCALLS_NUMBERS_H_ |
---|
25 | #define _SYSCALLS_NUMBERS_H_ |
---|
26 | |
---|
27 | /****************************************************************************************** |
---|
28 | * This enum defines the mnemonics for the syscall indexes. |
---|
29 | * It must be kept consistent with the array defined in do_syscalls.c |
---|
30 | *****************************************************************************************/ |
---|
31 | typedef enum { |
---|
32 | SYS_THREAD_EXIT = 0, |
---|
33 | SYS_THREAD_YIELD = 1, |
---|
34 | SYS_THREAD_CREATE = 2, |
---|
35 | SYS_THREAD_JOIN = 3, |
---|
36 | SYS_THREAD_DETACH = 4, |
---|
37 | SYS_THREAD_CANCEL = 5, |
---|
38 | SYS_SEM = 6, |
---|
39 | SYS_CONDVAR = 7, |
---|
40 | SYS_BARRIER = 8, |
---|
41 | SYS_MUTEX = 9, |
---|
42 | |
---|
43 | SYS_EXIT = 10, |
---|
44 | SYS_MUNMAP = 11, |
---|
45 | SYS_OPEN = 12, |
---|
46 | SYS_MMAP = 13, |
---|
47 | SYS_READ = 14, |
---|
48 | SYS_WRITE = 15, |
---|
49 | SYS_LSEEK = 16, |
---|
50 | SYS_CLOSE = 17, |
---|
51 | SYS_UNLINK = 18, |
---|
52 | SYS_PIPE = 19, |
---|
53 | |
---|
54 | SYS_CHDIR = 20, |
---|
55 | SYS_MKDIR = 21, |
---|
56 | SYS_MKFIFO = 22, |
---|
57 | SYS_OPENDIR = 23, |
---|
58 | SYS_READDIR = 24, |
---|
59 | SYS_CLOSEDIR = 25, |
---|
60 | SYS_GETCWD = 26, |
---|
61 | SYS_ISATTY = 27, |
---|
62 | SYS_ALARM = 28, |
---|
63 | SYS_RMDIR = 29, |
---|
64 | |
---|
65 | SYS_UTLS = 30, |
---|
66 | SYS_CHMOD = 31, |
---|
67 | SYS_SIGNAL = 32, |
---|
68 | SYS_TIMEOFDAY = 33, |
---|
69 | SYS_KILL = 34, |
---|
70 | SYS_GETPID = 35, |
---|
71 | SYS_FORK = 36, |
---|
72 | SYS_EXEC = 37, |
---|
73 | SYS_STAT = 38, |
---|
74 | SYS_WAIT = 39, |
---|
75 | |
---|
76 | SYS_GET_CONFIG = 40, |
---|
77 | SYS_GET_CORE = 41, |
---|
78 | SYS_GET_CYCLE = 42, |
---|
79 | SYS_DISPLAY = 43, |
---|
80 | SYS_UNDEFINED = 44, /// |
---|
81 | SYS_THREAD_SLEEP = 45, |
---|
82 | SYS_THREAD_WAKEUP = 46, |
---|
83 | SYS_TRACE = 47, |
---|
84 | SYS_FG = 48, |
---|
85 | SYS_IS_FG = 49, |
---|
86 | } syscalls_t; |
---|
87 | |
---|
88 | // Keep me concistant with enum above ! |
---|
89 | #define SYSCALLS_NR (50U) |
---|
90 | |
---|
91 | #endif // _SYSCALLS_NUMBERS_H_ |
---|