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