xref: /dragonos-dsc/src/platform/x86_64/nr.rs (revision b016daa429aaf1d08794a53a32b4fb9ab61814fe) !
1 pub const SYS_READ: usize = 0;
2 pub const SYS_WRITE: usize = 1;
3 pub const SYS_OPEN: usize = 2;
4 pub const SYS_CLOSE: usize = 3;
5 pub const SYS_STAT: usize = 4;
6 pub const SYS_FSTAT: usize = 5;
7 
8 pub const SYS_LSTAT: usize = 6;
9 pub const SYS_POLL: usize = 7;
10 pub const SYS_LSEEK: usize = 8;
11 pub const SYS_MMAP: usize = 9;
12 pub const SYS_MPROTECT: usize = 10;
13 
14 pub const SYS_MUNMAP: usize = 11;
15 pub const SYS_BRK: usize = 12;
16 pub const SYS_SIGACTION: usize = 13;
17 pub const SYS_RT_SIGPROCMASK: usize = 14;
18 pub const SYS_RT_SIGRETURN: usize = 15;
19 
20 pub const SYS_IOCTL: usize = 16;
21 pub const SYS_WRITEV: usize = 20;
22 pub const SYS_ACCESS: usize = 21;
23 pub const SYS_PIPE: usize = 22;
24 
25 pub const SYS_MADVISE: usize = 28;
26 
27 pub const SYS_DUP: usize = 32;
28 pub const SYS_DUP2: usize = 33;
29 
30 pub const SYS_NANOSLEEP: usize = 35;
31 
32 pub const SYS_GETPID: usize = 39;
33 
34 pub const SYS_SOCKET: usize = 41;
35 pub const SYS_CONNECT: usize = 42;
36 pub const SYS_ACCEPT: usize = 43;
37 pub const SYS_SENDTO: usize = 44;
38 pub const SYS_RECVFROM: usize = 45;
39 
40 pub const SYS_RECVMSG: usize = 47;
41 pub const SYS_SHUTDOWN: usize = 48;
42 pub const SYS_BIND: usize = 49;
43 pub const SYS_LISTEN: usize = 50;
44 pub const SYS_GETSOCKNAME: usize = 51;
45 pub const SYS_GETPEERNAME: usize = 52;
46 pub const SYS_SOCKET_PAIR: usize = 53;
47 pub const SYS_SETSOCKOPT: usize = 54;
48 pub const SYS_GETSOCKOPT: usize = 55;
49 pub const SYS_CLONE: usize = 56;
50 pub const SYS_FORK: usize = 57;
51 pub const SYS_VFORK: usize = 58;
52 pub const SYS_EXECVE: usize = 59;
53 pub const SYS_EXIT: usize = 60;
54 pub const SYS_WAIT4: usize = 61;
55 pub const SYS_KILL: usize = 62;
56 
57 pub const SYS_FCNTL: usize = 72;
58 
59 pub const SYS_FTRUNCATE: usize = 77;
60 pub const SYS_GET_DENTS: usize = 78;
61 
62 pub const SYS_GETCWD: usize = 79;
63 
64 pub const SYS_CHDIR: usize = 80;
65 
66 pub const SYS_MKDIR: usize = 83;
67 
68 pub const SYS_UNLINK: usize = 87;
69 pub const SYS_READLINK: usize = 89;
70 pub const SYS_CHMOD: usize = 90;
71 
72 pub const SYS_FCHMOD: usize = 91;
73 pub const SYS_UMASK: usize = 95;
74 
75 pub const SYS_GETTIMEOFDAY: usize = 96;
76 pub const SYS_GETRUSAGE: usize = 98;
77 pub const SYS_SYSINFO: usize = 99;
78 pub const SYS_GETUID: usize = 102;
79 pub const SYS_SYSLOG: usize = 103;
80 pub const SYS_GETGID: usize = 104;
81 pub const SYS_SETUID: usize = 105;
82 
83 pub const SYS_SETGID: usize = 106;
84 pub const SYS_GETEUID: usize = 107;
85 pub const SYS_GETEGID: usize = 108;
86 
87 pub const SYS_GETPPID: usize = 110;
88 pub const SYS_GETPGID: usize = 121;
89 pub const SYS_SIGALTSTACK: usize = 131;
90 pub const SYS_MKNOD: usize = 133;
91 
92 pub const SYS_ARCH_PRCTL: usize = 158;
93 
94 pub const SYS_REBOOT: usize = 169;
95 
96 pub const SYS_GETTID: usize = 186;
97 
98 pub const SYS_FUTEX: usize = 202;
99 
100 pub const SYS_GET_DENTS_64: usize = 217;
101 pub const SYS_SET_TID_ADDR: usize = 218;
102 
103 pub const SYS_CLOCK_GETTIME: usize = 228;
104 pub const SYS_OPENAT: usize = 257;
105 pub const SYS_UNLINK_AT: usize = 263;
106 pub const SYS_READLINK_AT: usize = 267;
107 pub const SYS_FCHMODAT: usize = 268;
108 pub const SYS_FACCESSAT: usize = 269;
109 pub const SYS_ACCEPT4: usize = 288;
110 pub const SYS_PIPE2: usize = 293;
111 pub const SYS_PRLIMIT64: usize = 302;
112 pub const SYS_GET_RANDOM: usize = 318;
113 
114 pub const SYS_FACCESSAT2: usize = 439;
115 
116 // 与linux不一致的调用,在linux基础上累加
117 // 独立系统调用号大于100000
118 pub const SYS_PUT_STRING: usize = 100000;
119 
120 // TODO: 和linux不一致
121 pub const SYS_SBRK: usize = 100001;
122 
123 /// todo: 该系统调用与Linux不一致,将来需要删除该系统调用!!! 删的时候记得改C版本的libc
124 pub const SYS_CLOCK: usize = 100002;
125 pub const SYS_SCHED: usize = 100003;
126