| author | |
| committer | |
| log | 63409cf422c71fee64c55f2b77999ee94366400f |
| tree | 812702ccc1f2f89150b2a6763cd1801e1deb2b39 |
| parent | 839d85e4405aef4856d1a35a6580226e997cc369 |
16 files changed, 2484 insertions(+), 2460 deletions(-)
lib/std/os.zig+1-1| ... | ... | @@ -2065,7 +2065,7 @@ pub fn isatty(handle: fd_t) bool { |
| 2065 | 2065 | } |
| 2066 | 2066 | if (builtin.os.tag == .linux) { |
| 2067 | 2067 | var wsz: linux.winsize = undefined; |
| 2068 | return linux.syscall3(linux.SYS_ioctl, @bitCast(usize, @as(isize, handle)), linux.TIOCGWINSZ, @ptrToInt(&wsz)) == 0; | |
| 2068 | return linux.syscall3(.ioctl, @bitCast(usize, @as(isize, handle)), linux.TIOCGWINSZ, @ptrToInt(&wsz)) == 0; | |
| 2069 | 2069 | } |
| 2070 | 2070 | unreachable; |
| 2071 | 2071 | } |
lib/std/os/bits/linux/arm-eabi.zig+403-399| ... | ... | @@ -9,406 +9,410 @@ const sigset_t = linux.sigset_t; |
| 9 | 9 | const uid_t = linux.uid_t; |
| 10 | 10 | const gid_t = linux.gid_t; |
| 11 | 11 | |
| 12 | pub const SYS_restart_syscall = 0; | |
| 13 | pub const SYS_exit = 1; | |
| 14 | pub const SYS_fork = 2; | |
| 15 | pub const SYS_read = 3; | |
| 16 | pub const SYS_write = 4; | |
| 17 | pub const SYS_open = 5; | |
| 18 | pub const SYS_close = 6; | |
| 19 | pub const SYS_creat = 8; | |
| 20 | pub const SYS_link = 9; | |
| 21 | pub const SYS_unlink = 10; | |
| 22 | pub const SYS_execve = 11; | |
| 23 | pub const SYS_chdir = 12; | |
| 24 | pub const SYS_mknod = 14; | |
| 25 | pub const SYS_chmod = 15; | |
| 26 | pub const SYS_lchown = 16; | |
| 27 | pub const SYS_lseek = 19; | |
| 28 | pub const SYS_getpid = 20; | |
| 29 | pub const SYS_mount = 21; | |
| 30 | pub const SYS_setuid = 23; | |
| 31 | pub const SYS_getuid = 24; | |
| 32 | pub const SYS_ptrace = 26; | |
| 33 | pub const SYS_pause = 29; | |
| 34 | pub const SYS_access = 33; | |
| 35 | pub const SYS_nice = 34; | |
| 36 | pub const SYS_sync = 36; | |
| 37 | pub const SYS_kill = 37; | |
| 38 | pub const SYS_rename = 38; | |
| 39 | pub const SYS_mkdir = 39; | |
| 40 | pub const SYS_rmdir = 40; | |
| 41 | pub const SYS_dup = 41; | |
| 42 | pub const SYS_pipe = 42; | |
| 43 | pub const SYS_times = 43; | |
| 44 | pub const SYS_brk = 45; | |
| 45 | pub const SYS_setgid = 46; | |
| 46 | pub const SYS_getgid = 47; | |
| 47 | pub const SYS_geteuid = 49; | |
| 48 | pub const SYS_getegid = 50; | |
| 49 | pub const SYS_acct = 51; | |
| 50 | pub const SYS_umount2 = 52; | |
| 51 | pub const SYS_ioctl = 54; | |
| 52 | pub const SYS_fcntl = 55; | |
| 53 | pub const SYS_setpgid = 57; | |
| 54 | pub const SYS_umask = 60; | |
| 55 | pub const SYS_chroot = 61; | |
| 56 | pub const SYS_ustat = 62; | |
| 57 | pub const SYS_dup2 = 63; | |
| 58 | pub const SYS_getppid = 64; | |
| 59 | pub const SYS_getpgrp = 65; | |
| 60 | pub const SYS_setsid = 66; | |
| 61 | pub const SYS_sigaction = 67; | |
| 62 | pub const SYS_setreuid = 70; | |
| 63 | pub const SYS_setregid = 71; | |
| 64 | pub const SYS_sigsuspend = 72; | |
| 65 | pub const SYS_sigpending = 73; | |
| 66 | pub const SYS_sethostname = 74; | |
| 67 | pub const SYS_setrlimit = 75; | |
| 68 | pub const SYS_getrusage = 77; | |
| 69 | pub const SYS_gettimeofday = 78; | |
| 70 | pub const SYS_settimeofday = 79; | |
| 71 | pub const SYS_getgroups = 80; | |
| 72 | pub const SYS_setgroups = 81; | |
| 73 | pub const SYS_symlink = 83; | |
| 74 | pub const SYS_readlink = 85; | |
| 75 | pub const SYS_uselib = 86; | |
| 76 | pub const SYS_swapon = 87; | |
| 77 | pub const SYS_reboot = 88; | |
| 78 | pub const SYS_munmap = 91; | |
| 79 | pub const SYS_truncate = 92; | |
| 80 | pub const SYS_ftruncate = 93; | |
| 81 | pub const SYS_fchmod = 94; | |
| 82 | pub const SYS_fchown = 95; | |
| 83 | pub const SYS_getpriority = 96; | |
| 84 | pub const SYS_setpriority = 97; | |
| 85 | pub const SYS_statfs = 99; | |
| 86 | pub const SYS_fstatfs = 100; | |
| 87 | pub const SYS_syslog = 103; | |
| 88 | pub const SYS_setitimer = 104; | |
| 89 | pub const SYS_getitimer = 105; | |
| 90 | pub const SYS_stat = 106; | |
| 91 | pub const SYS_lstat = 107; | |
| 92 | pub const SYS_fstat = 108; | |
| 93 | pub const SYS_vhangup = 111; | |
| 94 | pub const SYS_wait4 = 114; | |
| 95 | pub const SYS_swapoff = 115; | |
| 96 | pub const SYS_sysinfo = 116; | |
| 97 | pub const SYS_fsync = 118; | |
| 98 | pub const SYS_sigreturn = 119; | |
| 99 | pub const SYS_clone = 120; | |
| 100 | pub const SYS_setdomainname = 121; | |
| 101 | pub const SYS_uname = 122; | |
| 102 | pub const SYS_adjtimex = 124; | |
| 103 | pub const SYS_mprotect = 125; | |
| 104 | pub const SYS_sigprocmask = 126; | |
| 105 | pub const SYS_init_module = 128; | |
| 106 | pub const SYS_delete_module = 129; | |
| 107 | pub const SYS_quotactl = 131; | |
| 108 | pub const SYS_getpgid = 132; | |
| 109 | pub const SYS_fchdir = 133; | |
| 110 | pub const SYS_bdflush = 134; | |
| 111 | pub const SYS_sysfs = 135; | |
| 112 | pub const SYS_personality = 136; | |
| 113 | pub const SYS_setfsuid = 138; | |
| 114 | pub const SYS_setfsgid = 139; | |
| 115 | pub const SYS__llseek = 140; | |
| 116 | pub const SYS_getdents = 141; | |
| 117 | pub const SYS__newselect = 142; | |
| 118 | pub const SYS_flock = 143; | |
| 119 | pub const SYS_msync = 144; | |
| 120 | pub const SYS_readv = 145; | |
| 121 | pub const SYS_writev = 146; | |
| 122 | pub const SYS_getsid = 147; | |
| 123 | pub const SYS_fdatasync = 148; | |
| 124 | pub const SYS__sysctl = 149; | |
| 125 | pub const SYS_mlock = 150; | |
| 126 | pub const SYS_munlock = 151; | |
| 127 | pub const SYS_mlockall = 152; | |
| 128 | pub const SYS_munlockall = 153; | |
| 129 | pub const SYS_sched_setparam = 154; | |
| 130 | pub const SYS_sched_getparam = 155; | |
| 131 | pub const SYS_sched_setscheduler = 156; | |
| 132 | pub const SYS_sched_getscheduler = 157; | |
| 133 | pub const SYS_sched_yield = 158; | |
| 134 | pub const SYS_sched_get_priority_max = 159; | |
| 135 | pub const SYS_sched_get_priority_min = 160; | |
| 136 | pub const SYS_sched_rr_get_interval = 161; | |
| 137 | pub const SYS_nanosleep = 162; | |
| 138 | pub const SYS_mremap = 163; | |
| 139 | pub const SYS_setresuid = 164; | |
| 140 | pub const SYS_getresuid = 165; | |
| 141 | pub const SYS_poll = 168; | |
| 142 | pub const SYS_nfsservctl = 169; | |
| 143 | pub const SYS_setresgid = 170; | |
| 144 | pub const SYS_getresgid = 171; | |
| 145 | pub const SYS_prctl = 172; | |
| 146 | pub const SYS_rt_sigreturn = 173; | |
| 147 | pub const SYS_rt_sigaction = 174; | |
| 148 | pub const SYS_rt_sigprocmask = 175; | |
| 149 | pub const SYS_rt_sigpending = 176; | |
| 150 | pub const SYS_rt_sigtimedwait = 177; | |
| 151 | pub const SYS_rt_sigqueueinfo = 178; | |
| 152 | pub const SYS_rt_sigsuspend = 179; | |
| 153 | pub const SYS_pread64 = 180; | |
| 154 | pub const SYS_pwrite64 = 181; | |
| 155 | pub const SYS_chown = 182; | |
| 156 | pub const SYS_getcwd = 183; | |
| 157 | pub const SYS_capget = 184; | |
| 158 | pub const SYS_capset = 185; | |
| 159 | pub const SYS_sigaltstack = 186; | |
| 160 | pub const SYS_sendfile = 187; | |
| 161 | pub const SYS_vfork = 190; | |
| 162 | pub const SYS_ugetrlimit = 191; | |
| 163 | pub const SYS_mmap2 = 192; | |
| 164 | pub const SYS_truncate64 = 193; | |
| 165 | pub const SYS_ftruncate64 = 194; | |
| 166 | pub const SYS_stat64 = 195; | |
| 167 | pub const SYS_lstat64 = 196; | |
| 168 | pub const SYS_fstat64 = 197; | |
| 169 | pub const SYS_lchown32 = 198; | |
| 170 | pub const SYS_getuid32 = 199; | |
| 171 | pub const SYS_getgid32 = 200; | |
| 172 | pub const SYS_geteuid32 = 201; | |
| 173 | pub const SYS_getegid32 = 202; | |
| 174 | pub const SYS_setreuid32 = 203; | |
| 175 | pub const SYS_setregid32 = 204; | |
| 176 | pub const SYS_getgroups32 = 205; | |
| 177 | pub const SYS_setgroups32 = 206; | |
| 178 | pub const SYS_fchown32 = 207; | |
| 179 | pub const SYS_setresuid32 = 208; | |
| 180 | pub const SYS_getresuid32 = 209; | |
| 181 | pub const SYS_setresgid32 = 210; | |
| 182 | pub const SYS_getresgid32 = 211; | |
| 183 | pub const SYS_chown32 = 212; | |
| 184 | pub const SYS_setuid32 = 213; | |
| 185 | pub const SYS_setgid32 = 214; | |
| 186 | pub const SYS_setfsuid32 = 215; | |
| 187 | pub const SYS_setfsgid32 = 216; | |
| 188 | pub const SYS_getdents64 = 217; | |
| 189 | pub const SYS_pivot_root = 218; | |
| 190 | pub const SYS_mincore = 219; | |
| 191 | pub const SYS_madvise = 220; | |
| 192 | pub const SYS_fcntl64 = 221; | |
| 193 | pub const SYS_gettid = 224; | |
| 194 | pub const SYS_readahead = 225; | |
| 195 | pub const SYS_setxattr = 226; | |
| 196 | pub const SYS_lsetxattr = 227; | |
| 197 | pub const SYS_fsetxattr = 228; | |
| 198 | pub const SYS_getxattr = 229; | |
| 199 | pub const SYS_lgetxattr = 230; | |
| 200 | pub const SYS_fgetxattr = 231; | |
| 201 | pub const SYS_listxattr = 232; | |
| 202 | pub const SYS_llistxattr = 233; | |
| 203 | pub const SYS_flistxattr = 234; | |
| 204 | pub const SYS_removexattr = 235; | |
| 205 | pub const SYS_lremovexattr = 236; | |
| 206 | pub const SYS_fremovexattr = 237; | |
| 207 | pub const SYS_tkill = 238; | |
| 208 | pub const SYS_sendfile64 = 239; | |
| 209 | pub const SYS_futex = 240; | |
| 210 | pub const SYS_sched_setaffinity = 241; | |
| 211 | pub const SYS_sched_getaffinity = 242; | |
| 212 | pub const SYS_io_setup = 243; | |
| 213 | pub const SYS_io_destroy = 244; | |
| 214 | pub const SYS_io_getevents = 245; | |
| 215 | pub const SYS_io_submit = 246; | |
| 216 | pub const SYS_io_cancel = 247; | |
| 217 | pub const SYS_exit_group = 248; | |
| 218 | pub const SYS_lookup_dcookie = 249; | |
| 219 | pub const SYS_epoll_create = 250; | |
| 220 | pub const SYS_epoll_ctl = 251; | |
| 221 | pub const SYS_epoll_wait = 252; | |
| 222 | pub const SYS_remap_file_pages = 253; | |
| 223 | pub const SYS_set_tid_address = 256; | |
| 224 | pub const SYS_timer_create = 257; | |
| 225 | pub const SYS_timer_settime = 258; | |
| 226 | pub const SYS_timer_gettime = 259; | |
| 227 | pub const SYS_timer_getoverrun = 260; | |
| 228 | pub const SYS_timer_delete = 261; | |
| 229 | pub const SYS_clock_settime = 262; | |
| 230 | pub const SYS_clock_gettime = 263; | |
| 231 | pub const SYS_clock_getres = 264; | |
| 232 | pub const SYS_clock_nanosleep = 265; | |
| 233 | pub const SYS_statfs64 = 266; | |
| 234 | pub const SYS_fstatfs64 = 267; | |
| 235 | pub const SYS_tgkill = 268; | |
| 236 | pub const SYS_utimes = 269; | |
| 237 | pub const SYS_fadvise64_64 = 270; | |
| 238 | pub const SYS_arm_fadvise64_64 = 270; | |
| 239 | pub const SYS_pciconfig_iobase = 271; | |
| 240 | pub const SYS_pciconfig_read = 272; | |
| 241 | pub const SYS_pciconfig_write = 273; | |
| 242 | pub const SYS_mq_open = 274; | |
| 243 | pub const SYS_mq_unlink = 275; | |
| 244 | pub const SYS_mq_timedsend = 276; | |
| 245 | pub const SYS_mq_timedreceive = 277; | |
| 246 | pub const SYS_mq_notify = 278; | |
| 247 | pub const SYS_mq_getsetattr = 279; | |
| 248 | pub const SYS_waitid = 280; | |
| 249 | pub const SYS_socket = 281; | |
| 250 | pub const SYS_bind = 282; | |
| 251 | pub const SYS_connect = 283; | |
| 252 | pub const SYS_listen = 284; | |
| 253 | pub const SYS_accept = 285; | |
| 254 | pub const SYS_getsockname = 286; | |
| 255 | pub const SYS_getpeername = 287; | |
| 256 | pub const SYS_socketpair = 288; | |
| 257 | pub const SYS_send = 289; | |
| 258 | pub const SYS_sendto = 290; | |
| 259 | pub const SYS_recv = 291; | |
| 260 | pub const SYS_recvfrom = 292; | |
| 261 | pub const SYS_shutdown = 293; | |
| 262 | pub const SYS_setsockopt = 294; | |
| 263 | pub const SYS_getsockopt = 295; | |
| 264 | pub const SYS_sendmsg = 296; | |
| 265 | pub const SYS_recvmsg = 297; | |
| 266 | pub const SYS_semop = 298; | |
| 267 | pub const SYS_semget = 299; | |
| 268 | pub const SYS_semctl = 300; | |
| 269 | pub const SYS_msgsnd = 301; | |
| 270 | pub const SYS_msgrcv = 302; | |
| 271 | pub const SYS_msgget = 303; | |
| 272 | pub const SYS_msgctl = 304; | |
| 273 | pub const SYS_shmat = 305; | |
| 274 | pub const SYS_shmdt = 306; | |
| 275 | pub const SYS_shmget = 307; | |
| 276 | pub const SYS_shmctl = 308; | |
| 277 | pub const SYS_add_key = 309; | |
| 278 | pub const SYS_request_key = 310; | |
| 279 | pub const SYS_keyctl = 311; | |
| 280 | pub const SYS_semtimedop = 312; | |
| 281 | pub const SYS_vserver = 313; | |
| 282 | pub const SYS_ioprio_set = 314; | |
| 283 | pub const SYS_ioprio_get = 315; | |
| 284 | pub const SYS_inotify_init = 316; | |
| 285 | pub const SYS_inotify_add_watch = 317; | |
| 286 | pub const SYS_inotify_rm_watch = 318; | |
| 287 | pub const SYS_mbind = 319; | |
| 288 | pub const SYS_get_mempolicy = 320; | |
| 289 | pub const SYS_set_mempolicy = 321; | |
| 290 | pub const SYS_openat = 322; | |
| 291 | pub const SYS_mkdirat = 323; | |
| 292 | pub const SYS_mknodat = 324; | |
| 293 | pub const SYS_fchownat = 325; | |
| 294 | pub const SYS_futimesat = 326; | |
| 295 | pub const SYS_fstatat64 = 327; | |
| 296 | pub const SYS_unlinkat = 328; | |
| 297 | pub const SYS_renameat = 329; | |
| 298 | pub const SYS_linkat = 330; | |
| 299 | pub const SYS_symlinkat = 331; | |
| 300 | pub const SYS_readlinkat = 332; | |
| 301 | pub const SYS_fchmodat = 333; | |
| 302 | pub const SYS_faccessat = 334; | |
| 303 | pub const SYS_pselect6 = 335; | |
| 304 | pub const SYS_ppoll = 336; | |
| 305 | pub const SYS_unshare = 337; | |
| 306 | pub const SYS_set_robust_list = 338; | |
| 307 | pub const SYS_get_robust_list = 339; | |
| 308 | pub const SYS_splice = 340; | |
| 309 | pub const SYS_sync_file_range2 = 341; | |
| 310 | pub const SYS_arm_sync_file_range = 341; | |
| 311 | pub const SYS_tee = 342; | |
| 312 | pub const SYS_vmsplice = 343; | |
| 313 | pub const SYS_move_pages = 344; | |
| 314 | pub const SYS_getcpu = 345; | |
| 315 | pub const SYS_epoll_pwait = 346; | |
| 316 | pub const SYS_kexec_load = 347; | |
| 317 | pub const SYS_utimensat = 348; | |
| 318 | pub const SYS_signalfd = 349; | |
| 319 | pub const SYS_timerfd_create = 350; | |
| 320 | pub const SYS_eventfd = 351; | |
| 321 | pub const SYS_fallocate = 352; | |
| 322 | pub const SYS_timerfd_settime = 353; | |
| 323 | pub const SYS_timerfd_gettime = 354; | |
| 324 | pub const SYS_signalfd4 = 355; | |
| 325 | pub const SYS_eventfd2 = 356; | |
| 326 | pub const SYS_epoll_create1 = 357; | |
| 327 | pub const SYS_dup3 = 358; | |
| 328 | pub const SYS_pipe2 = 359; | |
| 329 | pub const SYS_inotify_init1 = 360; | |
| 330 | pub const SYS_preadv = 361; | |
| 331 | pub const SYS_pwritev = 362; | |
| 332 | pub const SYS_rt_tgsigqueueinfo = 363; | |
| 333 | pub const SYS_perf_event_open = 364; | |
| 334 | pub const SYS_recvmmsg = 365; | |
| 335 | pub const SYS_accept4 = 366; | |
| 336 | pub const SYS_fanotify_init = 367; | |
| 337 | pub const SYS_fanotify_mark = 368; | |
| 338 | pub const SYS_prlimit64 = 369; | |
| 339 | pub const SYS_name_to_handle_at = 370; | |
| 340 | pub const SYS_open_by_handle_at = 371; | |
| 341 | pub const SYS_clock_adjtime = 372; | |
| 342 | pub const SYS_syncfs = 373; | |
| 343 | pub const SYS_sendmmsg = 374; | |
| 344 | pub const SYS_setns = 375; | |
| 345 | pub const SYS_process_vm_readv = 376; | |
| 346 | pub const SYS_process_vm_writev = 377; | |
| 347 | pub const SYS_kcmp = 378; | |
| 348 | pub const SYS_finit_module = 379; | |
| 349 | pub const SYS_sched_setattr = 380; | |
| 350 | pub const SYS_sched_getattr = 381; | |
| 351 | pub const SYS_renameat2 = 382; | |
| 352 | pub const SYS_seccomp = 383; | |
| 353 | pub const SYS_getrandom = 384; | |
| 354 | pub const SYS_memfd_create = 385; | |
| 355 | pub const SYS_bpf = 386; | |
| 356 | pub const SYS_execveat = 387; | |
| 357 | pub const SYS_userfaultfd = 388; | |
| 358 | pub const SYS_membarrier = 389; | |
| 359 | pub const SYS_mlock2 = 390; | |
| 360 | pub const SYS_copy_file_range = 391; | |
| 361 | pub const SYS_preadv2 = 392; | |
| 362 | pub const SYS_pwritev2 = 393; | |
| 363 | pub const SYS_pkey_mprotect = 394; | |
| 364 | pub const SYS_pkey_alloc = 395; | |
| 365 | pub const SYS_pkey_free = 396; | |
| 366 | pub const SYS_statx = 397; | |
| 367 | pub const SYS_rseq = 398; | |
| 368 | pub const SYS_io_pgetevents = 399; | |
| 369 | pub const SYS_migrate_pages = 400; | |
| 370 | pub const SYS_kexec_file_load = 401; | |
| 371 | pub const SYS_clock_gettime64 = 403; | |
| 372 | pub const SYS_clock_settime64 = 404; | |
| 373 | pub const SYS_clock_adjtime64 = 405; | |
| 374 | pub const SYS_clock_getres_time64 = 406; | |
| 375 | pub const SYS_clock_nanosleep_time64 = 407; | |
| 376 | pub const SYS_timer_gettime64 = 408; | |
| 377 | pub const SYS_timer_settime64 = 409; | |
| 378 | pub const SYS_timerfd_gettime64 = 410; | |
| 379 | pub const SYS_timerfd_settime64 = 411; | |
| 380 | pub const SYS_utimensat_time64 = 412; | |
| 381 | pub const SYS_pselect6_time64 = 413; | |
| 382 | pub const SYS_ppoll_time64 = 414; | |
| 383 | pub const SYS_io_pgetevents_time64 = 416; | |
| 384 | pub const SYS_recvmmsg_time64 = 417; | |
| 385 | pub const SYS_mq_timedsend_time64 = 418; | |
| 386 | pub const SYS_mq_timedreceive_time64 = 419; | |
| 387 | pub const SYS_semtimedop_time64 = 420; | |
| 388 | pub const SYS_rt_sigtimedwait_time64 = 421; | |
| 389 | pub const SYS_futex_time64 = 422; | |
| 390 | pub const SYS_sched_rr_get_interval_time64 = 423; | |
| 391 | pub const SYS_pidfd_send_signal = 424; | |
| 392 | pub const SYS_io_uring_setup = 425; | |
| 393 | pub const SYS_io_uring_enter = 426; | |
| 394 | pub const SYS_io_uring_register = 427; | |
| 395 | pub const SYS_open_tree = 428; | |
| 396 | pub const SYS_move_mount = 429; | |
| 397 | pub const SYS_fsopen = 430; | |
| 398 | pub const SYS_fsconfig = 431; | |
| 399 | pub const SYS_fsmount = 432; | |
| 400 | pub const SYS_fspick = 433; | |
| 401 | pub const SYS_pidfd_open = 434; | |
| 402 | pub const SYS_clone3 = 435; | |
| 403 | pub const SYS_openat2 = 437; | |
| 404 | pub const SYS_pidfd_getfd = 438; | |
| 12 | pub const SYS = extern enum(usize) { | |
| 13 | restart_syscall = 0, | |
| 14 | exit = 1, | |
| 15 | fork = 2, | |
| 16 | read = 3, | |
| 17 | write = 4, | |
| 18 | open = 5, | |
| 19 | close = 6, | |
| 20 | creat = 8, | |
| 21 | link = 9, | |
| 22 | unlink = 10, | |
| 23 | execve = 11, | |
| 24 | chdir = 12, | |
| 25 | mknod = 14, | |
| 26 | chmod = 15, | |
| 27 | lchown = 16, | |
| 28 | lseek = 19, | |
| 29 | getpid = 20, | |
| 30 | mount = 21, | |
| 31 | setuid = 23, | |
| 32 | getuid = 24, | |
| 33 | ptrace = 26, | |
| 34 | pause = 29, | |
| 35 | access = 33, | |
| 36 | nice = 34, | |
| 37 | sync = 36, | |
| 38 | kill = 37, | |
| 39 | rename = 38, | |
| 40 | mkdir = 39, | |
| 41 | rmdir = 40, | |
| 42 | dup = 41, | |
| 43 | pipe = 42, | |
| 44 | times = 43, | |
| 45 | brk = 45, | |
| 46 | setgid = 46, | |
| 47 | getgid = 47, | |
| 48 | geteuid = 49, | |
| 49 | getegid = 50, | |
| 50 | acct = 51, | |
| 51 | umount2 = 52, | |
| 52 | ioctl = 54, | |
| 53 | fcntl = 55, | |
| 54 | setpgid = 57, | |
| 55 | umask = 60, | |
| 56 | chroot = 61, | |
| 57 | ustat = 62, | |
| 58 | dup2 = 63, | |
| 59 | getppid = 64, | |
| 60 | getpgrp = 65, | |
| 61 | setsid = 66, | |
| 62 | sigaction = 67, | |
| 63 | setreuid = 70, | |
| 64 | setregid = 71, | |
| 65 | sigsuspend = 72, | |
| 66 | sigpending = 73, | |
| 67 | sethostname = 74, | |
| 68 | setrlimit = 75, | |
| 69 | getrusage = 77, | |
| 70 | gettimeofday = 78, | |
| 71 | settimeofday = 79, | |
| 72 | getgroups = 80, | |
| 73 | setgroups = 81, | |
| 74 | symlink = 83, | |
| 75 | readlink = 85, | |
| 76 | uselib = 86, | |
| 77 | swapon = 87, | |
| 78 | reboot = 88, | |
| 79 | munmap = 91, | |
| 80 | truncate = 92, | |
| 81 | ftruncate = 93, | |
| 82 | fchmod = 94, | |
| 83 | fchown = 95, | |
| 84 | getpriority = 96, | |
| 85 | setpriority = 97, | |
| 86 | statfs = 99, | |
| 87 | fstatfs = 100, | |
| 88 | syslog = 103, | |
| 89 | setitimer = 104, | |
| 90 | getitimer = 105, | |
| 91 | stat = 106, | |
| 92 | lstat = 107, | |
| 93 | fstat = 108, | |
| 94 | vhangup = 111, | |
| 95 | wait4 = 114, | |
| 96 | swapoff = 115, | |
| 97 | sysinfo = 116, | |
| 98 | fsync = 118, | |
| 99 | sigreturn = 119, | |
| 100 | clone = 120, | |
| 101 | setdomainname = 121, | |
| 102 | uname = 122, | |
| 103 | adjtimex = 124, | |
| 104 | mprotect = 125, | |
| 105 | sigprocmask = 126, | |
| 106 | init_module = 128, | |
| 107 | delete_module = 129, | |
| 108 | quotactl = 131, | |
| 109 | getpgid = 132, | |
| 110 | fchdir = 133, | |
| 111 | bdflush = 134, | |
| 112 | sysfs = 135, | |
| 113 | personality = 136, | |
| 114 | setfsuid = 138, | |
| 115 | setfsgid = 139, | |
| 116 | _llseek = 140, | |
| 117 | getdents = 141, | |
| 118 | _newselect = 142, | |
| 119 | flock = 143, | |
| 120 | msync = 144, | |
| 121 | readv = 145, | |
| 122 | writev = 146, | |
| 123 | getsid = 147, | |
| 124 | fdatasync = 148, | |
| 125 | _sysctl = 149, | |
| 126 | mlock = 150, | |
| 127 | munlock = 151, | |
| 128 | mlockall = 152, | |
| 129 | munlockall = 153, | |
| 130 | sched_setparam = 154, | |
| 131 | sched_getparam = 155, | |
| 132 | sched_setscheduler = 156, | |
| 133 | sched_getscheduler = 157, | |
| 134 | sched_yield = 158, | |
| 135 | sched_get_priority_max = 159, | |
| 136 | sched_get_priority_min = 160, | |
| 137 | sched_rr_get_interval = 161, | |
| 138 | nanosleep = 162, | |
| 139 | mremap = 163, | |
| 140 | setresuid = 164, | |
| 141 | getresuid = 165, | |
| 142 | poll = 168, | |
| 143 | nfsservctl = 169, | |
| 144 | setresgid = 170, | |
| 145 | getresgid = 171, | |
| 146 | prctl = 172, | |
| 147 | rt_sigreturn = 173, | |
| 148 | rt_sigaction = 174, | |
| 149 | rt_sigprocmask = 175, | |
| 150 | rt_sigpending = 176, | |
| 151 | rt_sigtimedwait = 177, | |
| 152 | rt_sigqueueinfo = 178, | |
| 153 | rt_sigsuspend = 179, | |
| 154 | pread64 = 180, | |
| 155 | pwrite64 = 181, | |
| 156 | chown = 182, | |
| 157 | getcwd = 183, | |
| 158 | capget = 184, | |
| 159 | capset = 185, | |
| 160 | sigaltstack = 186, | |
| 161 | sendfile = 187, | |
| 162 | vfork = 190, | |
| 163 | ugetrlimit = 191, | |
| 164 | mmap2 = 192, | |
| 165 | truncate64 = 193, | |
| 166 | ftruncate64 = 194, | |
| 167 | stat64 = 195, | |
| 168 | lstat64 = 196, | |
| 169 | fstat64 = 197, | |
| 170 | lchown32 = 198, | |
| 171 | getuid32 = 199, | |
| 172 | getgid32 = 200, | |
| 173 | geteuid32 = 201, | |
| 174 | getegid32 = 202, | |
| 175 | setreuid32 = 203, | |
| 176 | setregid32 = 204, | |
| 177 | getgroups32 = 205, | |
| 178 | setgroups32 = 206, | |
| 179 | fchown32 = 207, | |
| 180 | setresuid32 = 208, | |
| 181 | getresuid32 = 209, | |
| 182 | setresgid32 = 210, | |
| 183 | getresgid32 = 211, | |
| 184 | chown32 = 212, | |
| 185 | setuid32 = 213, | |
| 186 | setgid32 = 214, | |
| 187 | setfsuid32 = 215, | |
| 188 | setfsgid32 = 216, | |
| 189 | getdents64 = 217, | |
| 190 | pivot_root = 218, | |
| 191 | mincore = 219, | |
| 192 | madvise = 220, | |
| 193 | fcntl64 = 221, | |
| 194 | gettid = 224, | |
| 195 | readahead = 225, | |
| 196 | setxattr = 226, | |
| 197 | lsetxattr = 227, | |
| 198 | fsetxattr = 228, | |
| 199 | getxattr = 229, | |
| 200 | lgetxattr = 230, | |
| 201 | fgetxattr = 231, | |
| 202 | listxattr = 232, | |
| 203 | llistxattr = 233, | |
| 204 | flistxattr = 234, | |
| 205 | removexattr = 235, | |
| 206 | lremovexattr = 236, | |
| 207 | fremovexattr = 237, | |
| 208 | tkill = 238, | |
| 209 | sendfile64 = 239, | |
| 210 | futex = 240, | |
| 211 | sched_setaffinity = 241, | |
| 212 | sched_getaffinity = 242, | |
| 213 | io_setup = 243, | |
| 214 | io_destroy = 244, | |
| 215 | io_getevents = 245, | |
| 216 | io_submit = 246, | |
| 217 | io_cancel = 247, | |
| 218 | exit_group = 248, | |
| 219 | lookup_dcookie = 249, | |
| 220 | epoll_create = 250, | |
| 221 | epoll_ctl = 251, | |
| 222 | epoll_wait = 252, | |
| 223 | remap_file_pages = 253, | |
| 224 | set_tid_address = 256, | |
| 225 | timer_create = 257, | |
| 226 | timer_settime = 258, | |
| 227 | timer_gettime = 259, | |
| 228 | timer_getoverrun = 260, | |
| 229 | timer_delete = 261, | |
| 230 | clock_settime = 262, | |
| 231 | clock_gettime = 263, | |
| 232 | clock_getres = 264, | |
| 233 | clock_nanosleep = 265, | |
| 234 | statfs64 = 266, | |
| 235 | fstatfs64 = 267, | |
| 236 | tgkill = 268, | |
| 237 | utimes = 269, | |
| 238 | fadvise64_64 = 270, | |
| 239 | arm_fadvise64_64 = 270, | |
| 240 | pciconfig_iobase = 271, | |
| 241 | pciconfig_read = 272, | |
| 242 | pciconfig_write = 273, | |
| 243 | mq_open = 274, | |
| 244 | mq_unlink = 275, | |
| 245 | mq_timedsend = 276, | |
| 246 | mq_timedreceive = 277, | |
| 247 | mq_notify = 278, | |
| 248 | mq_getsetattr = 279, | |
| 249 | waitid = 280, | |
| 250 | socket = 281, | |
| 251 | bind = 282, | |
| 252 | connect = 283, | |
| 253 | listen = 284, | |
| 254 | accept = 285, | |
| 255 | getsockname = 286, | |
| 256 | getpeername = 287, | |
| 257 | socketpair = 288, | |
| 258 | send = 289, | |
| 259 | sendto = 290, | |
| 260 | recv = 291, | |
| 261 | recvfrom = 292, | |
| 262 | shutdown = 293, | |
| 263 | setsockopt = 294, | |
| 264 | getsockopt = 295, | |
| 265 | sendmsg = 296, | |
| 266 | recvmsg = 297, | |
| 267 | semop = 298, | |
| 268 | semget = 299, | |
| 269 | semctl = 300, | |
| 270 | msgsnd = 301, | |
| 271 | msgrcv = 302, | |
| 272 | msgget = 303, | |
| 273 | msgctl = 304, | |
| 274 | shmat = 305, | |
| 275 | shmdt = 306, | |
| 276 | shmget = 307, | |
| 277 | shmctl = 308, | |
| 278 | add_key = 309, | |
| 279 | request_key = 310, | |
| 280 | keyctl = 311, | |
| 281 | semtimedop = 312, | |
| 282 | vserver = 313, | |
| 283 | ioprio_set = 314, | |
| 284 | ioprio_get = 315, | |
| 285 | inotify_init = 316, | |
| 286 | inotify_add_watch = 317, | |
| 287 | inotify_rm_watch = 318, | |
| 288 | mbind = 319, | |
| 289 | get_mempolicy = 320, | |
| 290 | set_mempolicy = 321, | |
| 291 | openat = 322, | |
| 292 | mkdirat = 323, | |
| 293 | mknodat = 324, | |
| 294 | fchownat = 325, | |
| 295 | futimesat = 326, | |
| 296 | fstatat64 = 327, | |
| 297 | unlinkat = 328, | |
| 298 | renameat = 329, | |
| 299 | linkat = 330, | |
| 300 | symlinkat = 331, | |
| 301 | readlinkat = 332, | |
| 302 | fchmodat = 333, | |
| 303 | faccessat = 334, | |
| 304 | pselect6 = 335, | |
| 305 | ppoll = 336, | |
| 306 | unshare = 337, | |
| 307 | set_robust_list = 338, | |
| 308 | get_robust_list = 339, | |
| 309 | splice = 340, | |
| 310 | sync_file_range2 = 341, | |
| 311 | arm_sync_file_range = 341, | |
| 312 | tee = 342, | |
| 313 | vmsplice = 343, | |
| 314 | move_pages = 344, | |
| 315 | getcpu = 345, | |
| 316 | epoll_pwait = 346, | |
| 317 | kexec_load = 347, | |
| 318 | utimensat = 348, | |
| 319 | signalfd = 349, | |
| 320 | timerfd_create = 350, | |
| 321 | eventfd = 351, | |
| 322 | fallocate = 352, | |
| 323 | timerfd_settime = 353, | |
| 324 | timerfd_gettime = 354, | |
| 325 | signalfd4 = 355, | |
| 326 | eventfd2 = 356, | |
| 327 | epoll_create1 = 357, | |
| 328 | dup3 = 358, | |
| 329 | pipe2 = 359, | |
| 330 | inotify_init1 = 360, | |
| 331 | preadv = 361, | |
| 332 | pwritev = 362, | |
| 333 | rt_tgsigqueueinfo = 363, | |
| 334 | perf_event_open = 364, | |
| 335 | recvmmsg = 365, | |
| 336 | accept4 = 366, | |
| 337 | fanotify_init = 367, | |
| 338 | fanotify_mark = 368, | |
| 339 | prlimit64 = 369, | |
| 340 | name_to_handle_at = 370, | |
| 341 | open_by_handle_at = 371, | |
| 342 | clock_adjtime = 372, | |
| 343 | syncfs = 373, | |
| 344 | sendmmsg = 374, | |
| 345 | setns = 375, | |
| 346 | process_vm_readv = 376, | |
| 347 | process_vm_writev = 377, | |
| 348 | kcmp = 378, | |
| 349 | finit_module = 379, | |
| 350 | sched_setattr = 380, | |
| 351 | sched_getattr = 381, | |
| 352 | renameat2 = 382, | |
| 353 | seccomp = 383, | |
| 354 | getrandom = 384, | |
| 355 | memfd_create = 385, | |
| 356 | bpf = 386, | |
| 357 | execveat = 387, | |
| 358 | userfaultfd = 388, | |
| 359 | membarrier = 389, | |
| 360 | mlock2 = 390, | |
| 361 | copy_file_range = 391, | |
| 362 | preadv2 = 392, | |
| 363 | pwritev2 = 393, | |
| 364 | pkey_mprotect = 394, | |
| 365 | pkey_alloc = 395, | |
| 366 | pkey_free = 396, | |
| 367 | statx = 397, | |
| 368 | rseq = 398, | |
| 369 | io_pgetevents = 399, | |
| 370 | migrate_pages = 400, | |
| 371 | kexec_file_load = 401, | |
| 372 | clock_gettime64 = 403, | |
| 373 | clock_settime64 = 404, | |
| 374 | clock_adjtime64 = 405, | |
| 375 | clock_getres_time64 = 406, | |
| 376 | clock_nanosleep_time64 = 407, | |
| 377 | timer_gettime64 = 408, | |
| 378 | timer_settime64 = 409, | |
| 379 | timerfd_gettime64 = 410, | |
| 380 | timerfd_settime64 = 411, | |
| 381 | utimensat_time64 = 412, | |
| 382 | pselect6_time64 = 413, | |
| 383 | ppoll_time64 = 414, | |
| 384 | io_pgetevents_time64 = 416, | |
| 385 | recvmmsg_time64 = 417, | |
| 386 | mq_timedsend_time64 = 418, | |
| 387 | mq_timedreceive_time64 = 419, | |
| 388 | semtimedop_time64 = 420, | |
| 389 | rt_sigtimedwait_time64 = 421, | |
| 390 | futex_time64 = 422, | |
| 391 | sched_rr_get_interval_time64 = 423, | |
| 392 | pidfd_send_signal = 424, | |
| 393 | io_uring_setup = 425, | |
| 394 | io_uring_enter = 426, | |
| 395 | io_uring_register = 427, | |
| 396 | open_tree = 428, | |
| 397 | move_mount = 429, | |
| 398 | fsopen = 430, | |
| 399 | fsconfig = 431, | |
| 400 | fsmount = 432, | |
| 401 | fspick = 433, | |
| 402 | pidfd_open = 434, | |
| 403 | clone3 = 435, | |
| 404 | openat2 = 437, | |
| 405 | pidfd_getfd = 438, | |
| 405 | 406 | |
| 406 | pub const SYS_breakpoint = 0x0f0001; | |
| 407 | pub const SYS_cacheflush = 0x0f0002; | |
| 408 | pub const SYS_usr26 = 0x0f0003; | |
| 409 | pub const SYS_usr32 = 0x0f0004; | |
| 410 | pub const SYS_set_tls = 0x0f0005; | |
| 411 | pub const SYS_get_tls = 0x0f0006; | |
| 407 | breakpoint = 0x0f0001, | |
| 408 | cacheflush = 0x0f0002, | |
| 409 | usr26 = 0x0f0003, | |
| 410 | usr32 = 0x0f0004, | |
| 411 | set_tls = 0x0f0005, | |
| 412 | get_tls = 0x0f0006, | |
| 413 | ||
| 414 | _, | |
| 415 | }; | |
| 412 | 416 | |
| 413 | 417 | pub const MMAP2_UNIT = 4096; |
| 414 | 418 |
lib/std/os/bits/linux/arm64.zig+296-293| ... | ... | @@ -10,300 +10,303 @@ const uid_t = linux.uid_t; |
| 10 | 10 | const gid_t = linux.gid_t; |
| 11 | 11 | const stack_t = linux.stack_t; |
| 12 | 12 | const sigset_t = linux.sigset_t; |
| 13 | pub const SYS = extern enum(usize) { | |
| 14 | io_setup = 0, | |
| 15 | io_destroy = 1, | |
| 16 | io_submit = 2, | |
| 17 | io_cancel = 3, | |
| 18 | io_getevents = 4, | |
| 19 | setxattr = 5, | |
| 20 | lsetxattr = 6, | |
| 21 | fsetxattr = 7, | |
| 22 | getxattr = 8, | |
| 23 | lgetxattr = 9, | |
| 24 | fgetxattr = 10, | |
| 25 | listxattr = 11, | |
| 26 | llistxattr = 12, | |
| 27 | flistxattr = 13, | |
| 28 | removexattr = 14, | |
| 29 | lremovexattr = 15, | |
| 30 | fremovexattr = 16, | |
| 31 | getcwd = 17, | |
| 32 | lookup_dcookie = 18, | |
| 33 | eventfd2 = 19, | |
| 34 | epoll_create1 = 20, | |
| 35 | epoll_ctl = 21, | |
| 36 | epoll_pwait = 22, | |
| 37 | dup = 23, | |
| 38 | dup3 = 24, | |
| 39 | fcntl = 25, | |
| 40 | inotify_init1 = 26, | |
| 41 | inotify_add_watch = 27, | |
| 42 | inotify_rm_watch = 28, | |
| 43 | ioctl = 29, | |
| 44 | ioprio_set = 30, | |
| 45 | ioprio_get = 31, | |
| 46 | flock = 32, | |
| 47 | mknodat = 33, | |
| 48 | mkdirat = 34, | |
| 49 | unlinkat = 35, | |
| 50 | symlinkat = 36, | |
| 51 | linkat = 37, | |
| 52 | renameat = 38, | |
| 53 | umount2 = 39, | |
| 54 | mount = 40, | |
| 55 | pivot_root = 41, | |
| 56 | nfsservctl = 42, | |
| 57 | statfs = 43, | |
| 58 | fstatfs = 44, | |
| 59 | truncate = 45, | |
| 60 | ftruncate = 46, | |
| 61 | fallocate = 47, | |
| 62 | faccessat = 48, | |
| 63 | chdir = 49, | |
| 64 | fchdir = 50, | |
| 65 | chroot = 51, | |
| 66 | fchmod = 52, | |
| 67 | fchmodat = 53, | |
| 68 | fchownat = 54, | |
| 69 | fchown = 55, | |
| 70 | openat = 56, | |
| 71 | close = 57, | |
| 72 | vhangup = 58, | |
| 73 | pipe2 = 59, | |
| 74 | quotactl = 60, | |
| 75 | getdents64 = 61, | |
| 76 | lseek = 62, | |
| 77 | read = 63, | |
| 78 | write = 64, | |
| 79 | readv = 65, | |
| 80 | writev = 66, | |
| 81 | pread64 = 67, | |
| 82 | pwrite64 = 68, | |
| 83 | preadv = 69, | |
| 84 | pwritev = 70, | |
| 85 | sendfile = 71, | |
| 86 | pselect6 = 72, | |
| 87 | ppoll = 73, | |
| 88 | signalfd4 = 74, | |
| 89 | vmsplice = 75, | |
| 90 | splice = 76, | |
| 91 | tee = 77, | |
| 92 | readlinkat = 78, | |
| 93 | fstatat = 79, | |
| 94 | fstat = 80, | |
| 95 | sync = 81, | |
| 96 | fsync = 82, | |
| 97 | fdatasync = 83, | |
| 98 | sync_file_range2 = 84, | |
| 99 | sync_file_range = 84, | |
| 100 | timerfd_create = 85, | |
| 101 | timerfd_settime = 86, | |
| 102 | timerfd_gettime = 87, | |
| 103 | utimensat = 88, | |
| 104 | acct = 89, | |
| 105 | capget = 90, | |
| 106 | capset = 91, | |
| 107 | personality = 92, | |
| 108 | exit = 93, | |
| 109 | exit_group = 94, | |
| 110 | waitid = 95, | |
| 111 | set_tid_address = 96, | |
| 112 | unshare = 97, | |
| 113 | futex = 98, | |
| 114 | set_robust_list = 99, | |
| 115 | get_robust_list = 100, | |
| 116 | nanosleep = 101, | |
| 117 | getitimer = 102, | |
| 118 | setitimer = 103, | |
| 119 | kexec_load = 104, | |
| 120 | init_module = 105, | |
| 121 | delete_module = 106, | |
| 122 | timer_create = 107, | |
| 123 | timer_gettime = 108, | |
| 124 | timer_getoverrun = 109, | |
| 125 | timer_settime = 110, | |
| 126 | timer_delete = 111, | |
| 127 | clock_settime = 112, | |
| 128 | clock_gettime = 113, | |
| 129 | clock_getres = 114, | |
| 130 | clock_nanosleep = 115, | |
| 131 | syslog = 116, | |
| 132 | ptrace = 117, | |
| 133 | sched_setparam = 118, | |
| 134 | sched_setscheduler = 119, | |
| 135 | sched_getscheduler = 120, | |
| 136 | sched_getparam = 121, | |
| 137 | sched_setaffinity = 122, | |
| 138 | sched_getaffinity = 123, | |
| 139 | sched_yield = 124, | |
| 140 | sched_get_priority_max = 125, | |
| 141 | sched_get_priority_min = 126, | |
| 142 | sched_rr_get_interval = 127, | |
| 143 | restart_syscall = 128, | |
| 144 | kill = 129, | |
| 145 | tkill = 130, | |
| 146 | tgkill = 131, | |
| 147 | sigaltstack = 132, | |
| 148 | rt_sigsuspend = 133, | |
| 149 | rt_sigaction = 134, | |
| 150 | rt_sigprocmask = 135, | |
| 151 | rt_sigpending = 136, | |
| 152 | rt_sigtimedwait = 137, | |
| 153 | rt_sigqueueinfo = 138, | |
| 154 | rt_sigreturn = 139, | |
| 155 | setpriority = 140, | |
| 156 | getpriority = 141, | |
| 157 | reboot = 142, | |
| 158 | setregid = 143, | |
| 159 | setgid = 144, | |
| 160 | setreuid = 145, | |
| 161 | setuid = 146, | |
| 162 | setresuid = 147, | |
| 163 | getresuid = 148, | |
| 164 | setresgid = 149, | |
| 165 | getresgid = 150, | |
| 166 | setfsuid = 151, | |
| 167 | setfsgid = 152, | |
| 168 | times = 153, | |
| 169 | setpgid = 154, | |
| 170 | getpgid = 155, | |
| 171 | getsid = 156, | |
| 172 | setsid = 157, | |
| 173 | getgroups = 158, | |
| 174 | setgroups = 159, | |
| 175 | uname = 160, | |
| 176 | sethostname = 161, | |
| 177 | setdomainname = 162, | |
| 178 | getrlimit = 163, | |
| 179 | setrlimit = 164, | |
| 180 | getrusage = 165, | |
| 181 | umask = 166, | |
| 182 | prctl = 167, | |
| 183 | getcpu = 168, | |
| 184 | gettimeofday = 169, | |
| 185 | settimeofday = 170, | |
| 186 | adjtimex = 171, | |
| 187 | getpid = 172, | |
| 188 | getppid = 173, | |
| 189 | getuid = 174, | |
| 190 | geteuid = 175, | |
| 191 | getgid = 176, | |
| 192 | getegid = 177, | |
| 193 | gettid = 178, | |
| 194 | sysinfo = 179, | |
| 195 | mq_open = 180, | |
| 196 | mq_unlink = 181, | |
| 197 | mq_timedsend = 182, | |
| 198 | mq_timedreceive = 183, | |
| 199 | mq_notify = 184, | |
| 200 | mq_getsetattr = 185, | |
| 201 | msgget = 186, | |
| 202 | msgctl = 187, | |
| 203 | msgrcv = 188, | |
| 204 | msgsnd = 189, | |
| 205 | semget = 190, | |
| 206 | semctl = 191, | |
| 207 | semtimedop = 192, | |
| 208 | semop = 193, | |
| 209 | shmget = 194, | |
| 210 | shmctl = 195, | |
| 211 | shmat = 196, | |
| 212 | shmdt = 197, | |
| 213 | socket = 198, | |
| 214 | socketpair = 199, | |
| 215 | bind = 200, | |
| 216 | listen = 201, | |
| 217 | accept = 202, | |
| 218 | connect = 203, | |
| 219 | getsockname = 204, | |
| 220 | getpeername = 205, | |
| 221 | sendto = 206, | |
| 222 | recvfrom = 207, | |
| 223 | setsockopt = 208, | |
| 224 | getsockopt = 209, | |
| 225 | shutdown = 210, | |
| 226 | sendmsg = 211, | |
| 227 | recvmsg = 212, | |
| 228 | readahead = 213, | |
| 229 | brk = 214, | |
| 230 | munmap = 215, | |
| 231 | mremap = 216, | |
| 232 | add_key = 217, | |
| 233 | request_key = 218, | |
| 234 | keyctl = 219, | |
| 235 | clone = 220, | |
| 236 | execve = 221, | |
| 237 | mmap = 222, | |
| 238 | fadvise64 = 223, | |
| 239 | swapon = 224, | |
| 240 | swapoff = 225, | |
| 241 | mprotect = 226, | |
| 242 | msync = 227, | |
| 243 | mlock = 228, | |
| 244 | munlock = 229, | |
| 245 | mlockall = 230, | |
| 246 | munlockall = 231, | |
| 247 | mincore = 232, | |
| 248 | madvise = 233, | |
| 249 | remap_file_pages = 234, | |
| 250 | mbind = 235, | |
| 251 | get_mempolicy = 236, | |
| 252 | set_mempolicy = 237, | |
| 253 | migrate_pages = 238, | |
| 254 | move_pages = 239, | |
| 255 | rt_tgsigqueueinfo = 240, | |
| 256 | perf_event_open = 241, | |
| 257 | accept4 = 242, | |
| 258 | recvmmsg = 243, | |
| 259 | arch_specific_syscall = 244, | |
| 260 | wait4 = 260, | |
| 261 | prlimit64 = 261, | |
| 262 | fanotify_init = 262, | |
| 263 | fanotify_mark = 263, | |
| 264 | clock_adjtime = 266, | |
| 265 | syncfs = 267, | |
| 266 | setns = 268, | |
| 267 | sendmmsg = 269, | |
| 268 | process_vm_readv = 270, | |
| 269 | process_vm_writev = 271, | |
| 270 | kcmp = 272, | |
| 271 | finit_module = 273, | |
| 272 | sched_setattr = 274, | |
| 273 | sched_getattr = 275, | |
| 274 | renameat2 = 276, | |
| 275 | seccomp = 277, | |
| 276 | getrandom = 278, | |
| 277 | memfd_create = 279, | |
| 278 | bpf = 280, | |
| 279 | execveat = 281, | |
| 280 | userfaultfd = 282, | |
| 281 | membarrier = 283, | |
| 282 | mlock2 = 284, | |
| 283 | copy_file_range = 285, | |
| 284 | preadv2 = 286, | |
| 285 | pwritev2 = 287, | |
| 286 | pkey_mprotect = 288, | |
| 287 | pkey_alloc = 289, | |
| 288 | pkey_free = 290, | |
| 289 | statx = 291, | |
| 290 | io_pgetevents = 292, | |
| 291 | rseq = 293, | |
| 292 | kexec_file_load = 294, | |
| 293 | pidfd_send_signal = 424, | |
| 294 | io_uring_setup = 425, | |
| 295 | io_uring_enter = 426, | |
| 296 | io_uring_register = 427, | |
| 297 | open_tree = 428, | |
| 298 | move_mount = 429, | |
| 299 | fsopen = 430, | |
| 300 | fsconfig = 431, | |
| 301 | fsmount = 432, | |
| 302 | fspick = 433, | |
| 303 | pidfd_open = 434, | |
| 304 | clone3 = 435, | |
| 305 | openat2 = 437, | |
| 306 | pidfd_getfd = 438, | |
| 13 | 307 | |
| 14 | pub const SYS_io_setup = 0; | |
| 15 | pub const SYS_io_destroy = 1; | |
| 16 | pub const SYS_io_submit = 2; | |
| 17 | pub const SYS_io_cancel = 3; | |
| 18 | pub const SYS_io_getevents = 4; | |
| 19 | pub const SYS_setxattr = 5; | |
| 20 | pub const SYS_lsetxattr = 6; | |
| 21 | pub const SYS_fsetxattr = 7; | |
| 22 | pub const SYS_getxattr = 8; | |
| 23 | pub const SYS_lgetxattr = 9; | |
| 24 | pub const SYS_fgetxattr = 10; | |
| 25 | pub const SYS_listxattr = 11; | |
| 26 | pub const SYS_llistxattr = 12; | |
| 27 | pub const SYS_flistxattr = 13; | |
| 28 | pub const SYS_removexattr = 14; | |
| 29 | pub const SYS_lremovexattr = 15; | |
| 30 | pub const SYS_fremovexattr = 16; | |
| 31 | pub const SYS_getcwd = 17; | |
| 32 | pub const SYS_lookup_dcookie = 18; | |
| 33 | pub const SYS_eventfd2 = 19; | |
| 34 | pub const SYS_epoll_create1 = 20; | |
| 35 | pub const SYS_epoll_ctl = 21; | |
| 36 | pub const SYS_epoll_pwait = 22; | |
| 37 | pub const SYS_dup = 23; | |
| 38 | pub const SYS_dup3 = 24; | |
| 39 | pub const SYS_fcntl = 25; | |
| 40 | pub const SYS_inotify_init1 = 26; | |
| 41 | pub const SYS_inotify_add_watch = 27; | |
| 42 | pub const SYS_inotify_rm_watch = 28; | |
| 43 | pub const SYS_ioctl = 29; | |
| 44 | pub const SYS_ioprio_set = 30; | |
| 45 | pub const SYS_ioprio_get = 31; | |
| 46 | pub const SYS_flock = 32; | |
| 47 | pub const SYS_mknodat = 33; | |
| 48 | pub const SYS_mkdirat = 34; | |
| 49 | pub const SYS_unlinkat = 35; | |
| 50 | pub const SYS_symlinkat = 36; | |
| 51 | pub const SYS_linkat = 37; | |
| 52 | pub const SYS_renameat = 38; | |
| 53 | pub const SYS_umount2 = 39; | |
| 54 | pub const SYS_mount = 40; | |
| 55 | pub const SYS_pivot_root = 41; | |
| 56 | pub const SYS_nfsservctl = 42; | |
| 57 | pub const SYS_statfs = 43; | |
| 58 | pub const SYS_fstatfs = 44; | |
| 59 | pub const SYS_truncate = 45; | |
| 60 | pub const SYS_ftruncate = 46; | |
| 61 | pub const SYS_fallocate = 47; | |
| 62 | pub const SYS_faccessat = 48; | |
| 63 | pub const SYS_chdir = 49; | |
| 64 | pub const SYS_fchdir = 50; | |
| 65 | pub const SYS_chroot = 51; | |
| 66 | pub const SYS_fchmod = 52; | |
| 67 | pub const SYS_fchmodat = 53; | |
| 68 | pub const SYS_fchownat = 54; | |
| 69 | pub const SYS_fchown = 55; | |
| 70 | pub const SYS_openat = 56; | |
| 71 | pub const SYS_close = 57; | |
| 72 | pub const SYS_vhangup = 58; | |
| 73 | pub const SYS_pipe2 = 59; | |
| 74 | pub const SYS_quotactl = 60; | |
| 75 | pub const SYS_getdents64 = 61; | |
| 76 | pub const SYS_lseek = 62; | |
| 77 | pub const SYS_read = 63; | |
| 78 | pub const SYS_write = 64; | |
| 79 | pub const SYS_readv = 65; | |
| 80 | pub const SYS_writev = 66; | |
| 81 | pub const SYS_pread64 = 67; | |
| 82 | pub const SYS_pwrite64 = 68; | |
| 83 | pub const SYS_preadv = 69; | |
| 84 | pub const SYS_pwritev = 70; | |
| 85 | pub const SYS_sendfile = 71; | |
| 86 | pub const SYS_pselect6 = 72; | |
| 87 | pub const SYS_ppoll = 73; | |
| 88 | pub const SYS_signalfd4 = 74; | |
| 89 | pub const SYS_vmsplice = 75; | |
| 90 | pub const SYS_splice = 76; | |
| 91 | pub const SYS_tee = 77; | |
| 92 | pub const SYS_readlinkat = 78; | |
| 93 | pub const SYS_fstatat = 79; | |
| 94 | pub const SYS_fstat = 80; | |
| 95 | pub const SYS_sync = 81; | |
| 96 | pub const SYS_fsync = 82; | |
| 97 | pub const SYS_fdatasync = 83; | |
| 98 | pub const SYS_sync_file_range2 = 84; | |
| 99 | pub const SYS_sync_file_range = 84; | |
| 100 | pub const SYS_timerfd_create = 85; | |
| 101 | pub const SYS_timerfd_settime = 86; | |
| 102 | pub const SYS_timerfd_gettime = 87; | |
| 103 | pub const SYS_utimensat = 88; | |
| 104 | pub const SYS_acct = 89; | |
| 105 | pub const SYS_capget = 90; | |
| 106 | pub const SYS_capset = 91; | |
| 107 | pub const SYS_personality = 92; | |
| 108 | pub const SYS_exit = 93; | |
| 109 | pub const SYS_exit_group = 94; | |
| 110 | pub const SYS_waitid = 95; | |
| 111 | pub const SYS_set_tid_address = 96; | |
| 112 | pub const SYS_unshare = 97; | |
| 113 | pub const SYS_futex = 98; | |
| 114 | pub const SYS_set_robust_list = 99; | |
| 115 | pub const SYS_get_robust_list = 100; | |
| 116 | pub const SYS_nanosleep = 101; | |
| 117 | pub const SYS_getitimer = 102; | |
| 118 | pub const SYS_setitimer = 103; | |
| 119 | pub const SYS_kexec_load = 104; | |
| 120 | pub const SYS_init_module = 105; | |
| 121 | pub const SYS_delete_module = 106; | |
| 122 | pub const SYS_timer_create = 107; | |
| 123 | pub const SYS_timer_gettime = 108; | |
| 124 | pub const SYS_timer_getoverrun = 109; | |
| 125 | pub const SYS_timer_settime = 110; | |
| 126 | pub const SYS_timer_delete = 111; | |
| 127 | pub const SYS_clock_settime = 112; | |
| 128 | pub const SYS_clock_gettime = 113; | |
| 129 | pub const SYS_clock_getres = 114; | |
| 130 | pub const SYS_clock_nanosleep = 115; | |
| 131 | pub const SYS_syslog = 116; | |
| 132 | pub const SYS_ptrace = 117; | |
| 133 | pub const SYS_sched_setparam = 118; | |
| 134 | pub const SYS_sched_setscheduler = 119; | |
| 135 | pub const SYS_sched_getscheduler = 120; | |
| 136 | pub const SYS_sched_getparam = 121; | |
| 137 | pub const SYS_sched_setaffinity = 122; | |
| 138 | pub const SYS_sched_getaffinity = 123; | |
| 139 | pub const SYS_sched_yield = 124; | |
| 140 | pub const SYS_sched_get_priority_max = 125; | |
| 141 | pub const SYS_sched_get_priority_min = 126; | |
| 142 | pub const SYS_sched_rr_get_interval = 127; | |
| 143 | pub const SYS_restart_syscall = 128; | |
| 144 | pub const SYS_kill = 129; | |
| 145 | pub const SYS_tkill = 130; | |
| 146 | pub const SYS_tgkill = 131; | |
| 147 | pub const SYS_sigaltstack = 132; | |
| 148 | pub const SYS_rt_sigsuspend = 133; | |
| 149 | pub const SYS_rt_sigaction = 134; | |
| 150 | pub const SYS_rt_sigprocmask = 135; | |
| 151 | pub const SYS_rt_sigpending = 136; | |
| 152 | pub const SYS_rt_sigtimedwait = 137; | |
| 153 | pub const SYS_rt_sigqueueinfo = 138; | |
| 154 | pub const SYS_rt_sigreturn = 139; | |
| 155 | pub const SYS_setpriority = 140; | |
| 156 | pub const SYS_getpriority = 141; | |
| 157 | pub const SYS_reboot = 142; | |
| 158 | pub const SYS_setregid = 143; | |
| 159 | pub const SYS_setgid = 144; | |
| 160 | pub const SYS_setreuid = 145; | |
| 161 | pub const SYS_setuid = 146; | |
| 162 | pub const SYS_setresuid = 147; | |
| 163 | pub const SYS_getresuid = 148; | |
| 164 | pub const SYS_setresgid = 149; | |
| 165 | pub const SYS_getresgid = 150; | |
| 166 | pub const SYS_setfsuid = 151; | |
| 167 | pub const SYS_setfsgid = 152; | |
| 168 | pub const SYS_times = 153; | |
| 169 | pub const SYS_setpgid = 154; | |
| 170 | pub const SYS_getpgid = 155; | |
| 171 | pub const SYS_getsid = 156; | |
| 172 | pub const SYS_setsid = 157; | |
| 173 | pub const SYS_getgroups = 158; | |
| 174 | pub const SYS_setgroups = 159; | |
| 175 | pub const SYS_uname = 160; | |
| 176 | pub const SYS_sethostname = 161; | |
| 177 | pub const SYS_setdomainname = 162; | |
| 178 | pub const SYS_getrlimit = 163; | |
| 179 | pub const SYS_setrlimit = 164; | |
| 180 | pub const SYS_getrusage = 165; | |
| 181 | pub const SYS_umask = 166; | |
| 182 | pub const SYS_prctl = 167; | |
| 183 | pub const SYS_getcpu = 168; | |
| 184 | pub const SYS_gettimeofday = 169; | |
| 185 | pub const SYS_settimeofday = 170; | |
| 186 | pub const SYS_adjtimex = 171; | |
| 187 | pub const SYS_getpid = 172; | |
| 188 | pub const SYS_getppid = 173; | |
| 189 | pub const SYS_getuid = 174; | |
| 190 | pub const SYS_geteuid = 175; | |
| 191 | pub const SYS_getgid = 176; | |
| 192 | pub const SYS_getegid = 177; | |
| 193 | pub const SYS_gettid = 178; | |
| 194 | pub const SYS_sysinfo = 179; | |
| 195 | pub const SYS_mq_open = 180; | |
| 196 | pub const SYS_mq_unlink = 181; | |
| 197 | pub const SYS_mq_timedsend = 182; | |
| 198 | pub const SYS_mq_timedreceive = 183; | |
| 199 | pub const SYS_mq_notify = 184; | |
| 200 | pub const SYS_mq_getsetattr = 185; | |
| 201 | pub const SYS_msgget = 186; | |
| 202 | pub const SYS_msgctl = 187; | |
| 203 | pub const SYS_msgrcv = 188; | |
| 204 | pub const SYS_msgsnd = 189; | |
| 205 | pub const SYS_semget = 190; | |
| 206 | pub const SYS_semctl = 191; | |
| 207 | pub const SYS_semtimedop = 192; | |
| 208 | pub const SYS_semop = 193; | |
| 209 | pub const SYS_shmget = 194; | |
| 210 | pub const SYS_shmctl = 195; | |
| 211 | pub const SYS_shmat = 196; | |
| 212 | pub const SYS_shmdt = 197; | |
| 213 | pub const SYS_socket = 198; | |
| 214 | pub const SYS_socketpair = 199; | |
| 215 | pub const SYS_bind = 200; | |
| 216 | pub const SYS_listen = 201; | |
| 217 | pub const SYS_accept = 202; | |
| 218 | pub const SYS_connect = 203; | |
| 219 | pub const SYS_getsockname = 204; | |
| 220 | pub const SYS_getpeername = 205; | |
| 221 | pub const SYS_sendto = 206; | |
| 222 | pub const SYS_recvfrom = 207; | |
| 223 | pub const SYS_setsockopt = 208; | |
| 224 | pub const SYS_getsockopt = 209; | |
| 225 | pub const SYS_shutdown = 210; | |
| 226 | pub const SYS_sendmsg = 211; | |
| 227 | pub const SYS_recvmsg = 212; | |
| 228 | pub const SYS_readahead = 213; | |
| 229 | pub const SYS_brk = 214; | |
| 230 | pub const SYS_munmap = 215; | |
| 231 | pub const SYS_mremap = 216; | |
| 232 | pub const SYS_add_key = 217; | |
| 233 | pub const SYS_request_key = 218; | |
| 234 | pub const SYS_keyctl = 219; | |
| 235 | pub const SYS_clone = 220; | |
| 236 | pub const SYS_execve = 221; | |
| 237 | pub const SYS_mmap = 222; | |
| 238 | pub const SYS_fadvise64 = 223; | |
| 239 | pub const SYS_swapon = 224; | |
| 240 | pub const SYS_swapoff = 225; | |
| 241 | pub const SYS_mprotect = 226; | |
| 242 | pub const SYS_msync = 227; | |
| 243 | pub const SYS_mlock = 228; | |
| 244 | pub const SYS_munlock = 229; | |
| 245 | pub const SYS_mlockall = 230; | |
| 246 | pub const SYS_munlockall = 231; | |
| 247 | pub const SYS_mincore = 232; | |
| 248 | pub const SYS_madvise = 233; | |
| 249 | pub const SYS_remap_file_pages = 234; | |
| 250 | pub const SYS_mbind = 235; | |
| 251 | pub const SYS_get_mempolicy = 236; | |
| 252 | pub const SYS_set_mempolicy = 237; | |
| 253 | pub const SYS_migrate_pages = 238; | |
| 254 | pub const SYS_move_pages = 239; | |
| 255 | pub const SYS_rt_tgsigqueueinfo = 240; | |
| 256 | pub const SYS_perf_event_open = 241; | |
| 257 | pub const SYS_accept4 = 242; | |
| 258 | pub const SYS_recvmmsg = 243; | |
| 259 | pub const SYS_arch_specific_syscall = 244; | |
| 260 | pub const SYS_wait4 = 260; | |
| 261 | pub const SYS_prlimit64 = 261; | |
| 262 | pub const SYS_fanotify_init = 262; | |
| 263 | pub const SYS_fanotify_mark = 263; | |
| 264 | pub const SYS_clock_adjtime = 266; | |
| 265 | pub const SYS_syncfs = 267; | |
| 266 | pub const SYS_setns = 268; | |
| 267 | pub const SYS_sendmmsg = 269; | |
| 268 | pub const SYS_process_vm_readv = 270; | |
| 269 | pub const SYS_process_vm_writev = 271; | |
| 270 | pub const SYS_kcmp = 272; | |
| 271 | pub const SYS_finit_module = 273; | |
| 272 | pub const SYS_sched_setattr = 274; | |
| 273 | pub const SYS_sched_getattr = 275; | |
| 274 | pub const SYS_renameat2 = 276; | |
| 275 | pub const SYS_seccomp = 277; | |
| 276 | pub const SYS_getrandom = 278; | |
| 277 | pub const SYS_memfd_create = 279; | |
| 278 | pub const SYS_bpf = 280; | |
| 279 | pub const SYS_execveat = 281; | |
| 280 | pub const SYS_userfaultfd = 282; | |
| 281 | pub const SYS_membarrier = 283; | |
| 282 | pub const SYS_mlock2 = 284; | |
| 283 | pub const SYS_copy_file_range = 285; | |
| 284 | pub const SYS_preadv2 = 286; | |
| 285 | pub const SYS_pwritev2 = 287; | |
| 286 | pub const SYS_pkey_mprotect = 288; | |
| 287 | pub const SYS_pkey_alloc = 289; | |
| 288 | pub const SYS_pkey_free = 290; | |
| 289 | pub const SYS_statx = 291; | |
| 290 | pub const SYS_io_pgetevents = 292; | |
| 291 | pub const SYS_rseq = 293; | |
| 292 | pub const SYS_kexec_file_load = 294; | |
| 293 | pub const SYS_pidfd_send_signal = 424; | |
| 294 | pub const SYS_io_uring_setup = 425; | |
| 295 | pub const SYS_io_uring_enter = 426; | |
| 296 | pub const SYS_io_uring_register = 427; | |
| 297 | pub const SYS_open_tree = 428; | |
| 298 | pub const SYS_move_mount = 429; | |
| 299 | pub const SYS_fsopen = 430; | |
| 300 | pub const SYS_fsconfig = 431; | |
| 301 | pub const SYS_fsmount = 432; | |
| 302 | pub const SYS_fspick = 433; | |
| 303 | pub const SYS_pidfd_open = 434; | |
| 304 | pub const SYS_clone3 = 435; | |
| 305 | pub const SYS_openat2 = 437; | |
| 306 | pub const SYS_pidfd_getfd = 438; | |
| 308 | _, | |
| 309 | }; | |
| 307 | 310 | |
| 308 | 311 | pub const O_CREAT = 0o100; |
| 309 | 312 | pub const O_EXCL = 0o200; |
lib/std/os/bits/linux/i386.zig+429-425| ... | ... | @@ -11,431 +11,435 @@ const gid_t = linux.gid_t; |
| 11 | 11 | const stack_t = linux.stack_t; |
| 12 | 12 | const sigset_t = linux.sigset_t; |
| 13 | 13 | |
| 14 | pub const SYS_restart_syscall = 0; | |
| 15 | pub const SYS_exit = 1; | |
| 16 | pub const SYS_fork = 2; | |
| 17 | pub const SYS_read = 3; | |
| 18 | pub const SYS_write = 4; | |
| 19 | pub const SYS_open = 5; | |
| 20 | pub const SYS_close = 6; | |
| 21 | pub const SYS_waitpid = 7; | |
| 22 | pub const SYS_creat = 8; | |
| 23 | pub const SYS_link = 9; | |
| 24 | pub const SYS_unlink = 10; | |
| 25 | pub const SYS_execve = 11; | |
| 26 | pub const SYS_chdir = 12; | |
| 27 | pub const SYS_time = 13; | |
| 28 | pub const SYS_mknod = 14; | |
| 29 | pub const SYS_chmod = 15; | |
| 30 | pub const SYS_lchown = 16; | |
| 31 | pub const SYS_break = 17; | |
| 32 | pub const SYS_oldstat = 18; | |
| 33 | pub const SYS_lseek = 19; | |
| 34 | pub const SYS_getpid = 20; | |
| 35 | pub const SYS_mount = 21; | |
| 36 | pub const SYS_umount = 22; | |
| 37 | pub const SYS_setuid = 23; | |
| 38 | pub const SYS_getuid = 24; | |
| 39 | pub const SYS_stime = 25; | |
| 40 | pub const SYS_ptrace = 26; | |
| 41 | pub const SYS_alarm = 27; | |
| 42 | pub const SYS_oldfstat = 28; | |
| 43 | pub const SYS_pause = 29; | |
| 44 | pub const SYS_utime = 30; | |
| 45 | pub const SYS_stty = 31; | |
| 46 | pub const SYS_gtty = 32; | |
| 47 | pub const SYS_access = 33; | |
| 48 | pub const SYS_nice = 34; | |
| 49 | pub const SYS_ftime = 35; | |
| 50 | pub const SYS_sync = 36; | |
| 51 | pub const SYS_kill = 37; | |
| 52 | pub const SYS_rename = 38; | |
| 53 | pub const SYS_mkdir = 39; | |
| 54 | pub const SYS_rmdir = 40; | |
| 55 | pub const SYS_dup = 41; | |
| 56 | pub const SYS_pipe = 42; | |
| 57 | pub const SYS_times = 43; | |
| 58 | pub const SYS_prof = 44; | |
| 59 | pub const SYS_brk = 45; | |
| 60 | pub const SYS_setgid = 46; | |
| 61 | pub const SYS_getgid = 47; | |
| 62 | pub const SYS_signal = 48; | |
| 63 | pub const SYS_geteuid = 49; | |
| 64 | pub const SYS_getegid = 50; | |
| 65 | pub const SYS_acct = 51; | |
| 66 | pub const SYS_umount2 = 52; | |
| 67 | pub const SYS_lock = 53; | |
| 68 | pub const SYS_ioctl = 54; | |
| 69 | pub const SYS_fcntl = 55; | |
| 70 | pub const SYS_mpx = 56; | |
| 71 | pub const SYS_setpgid = 57; | |
| 72 | pub const SYS_ulimit = 58; | |
| 73 | pub const SYS_oldolduname = 59; | |
| 74 | pub const SYS_umask = 60; | |
| 75 | pub const SYS_chroot = 61; | |
| 76 | pub const SYS_ustat = 62; | |
| 77 | pub const SYS_dup2 = 63; | |
| 78 | pub const SYS_getppid = 64; | |
| 79 | pub const SYS_getpgrp = 65; | |
| 80 | pub const SYS_setsid = 66; | |
| 81 | pub const SYS_sigaction = 67; | |
| 82 | pub const SYS_sgetmask = 68; | |
| 83 | pub const SYS_ssetmask = 69; | |
| 84 | pub const SYS_setreuid = 70; | |
| 85 | pub const SYS_setregid = 71; | |
| 86 | pub const SYS_sigsuspend = 72; | |
| 87 | pub const SYS_sigpending = 73; | |
| 88 | pub const SYS_sethostname = 74; | |
| 89 | pub const SYS_setrlimit = 75; | |
| 90 | pub const SYS_getrlimit = 76; | |
| 91 | pub const SYS_getrusage = 77; | |
| 92 | pub const SYS_gettimeofday = 78; | |
| 93 | pub const SYS_settimeofday = 79; | |
| 94 | pub const SYS_getgroups = 80; | |
| 95 | pub const SYS_setgroups = 81; | |
| 96 | pub const SYS_select = 82; | |
| 97 | pub const SYS_symlink = 83; | |
| 98 | pub const SYS_oldlstat = 84; | |
| 99 | pub const SYS_readlink = 85; | |
| 100 | pub const SYS_uselib = 86; | |
| 101 | pub const SYS_swapon = 87; | |
| 102 | pub const SYS_reboot = 88; | |
| 103 | pub const SYS_readdir = 89; | |
| 104 | pub const SYS_mmap = 90; | |
| 105 | pub const SYS_munmap = 91; | |
| 106 | pub const SYS_truncate = 92; | |
| 107 | pub const SYS_ftruncate = 93; | |
| 108 | pub const SYS_fchmod = 94; | |
| 109 | pub const SYS_fchown = 95; | |
| 110 | pub const SYS_getpriority = 96; | |
| 111 | pub const SYS_setpriority = 97; | |
| 112 | pub const SYS_profil = 98; | |
| 113 | pub const SYS_statfs = 99; | |
| 114 | pub const SYS_fstatfs = 100; | |
| 115 | pub const SYS_ioperm = 101; | |
| 116 | pub const SYS_socketcall = 102; | |
| 117 | pub const SYS_syslog = 103; | |
| 118 | pub const SYS_setitimer = 104; | |
| 119 | pub const SYS_getitimer = 105; | |
| 120 | pub const SYS_stat = 106; | |
| 121 | pub const SYS_lstat = 107; | |
| 122 | pub const SYS_fstat = 108; | |
| 123 | pub const SYS_olduname = 109; | |
| 124 | pub const SYS_iopl = 110; | |
| 125 | pub const SYS_vhangup = 111; | |
| 126 | pub const SYS_idle = 112; | |
| 127 | pub const SYS_vm86old = 113; | |
| 128 | pub const SYS_wait4 = 114; | |
| 129 | pub const SYS_swapoff = 115; | |
| 130 | pub const SYS_sysinfo = 116; | |
| 131 | pub const SYS_ipc = 117; | |
| 132 | pub const SYS_fsync = 118; | |
| 133 | pub const SYS_sigreturn = 119; | |
| 134 | pub const SYS_clone = 120; | |
| 135 | pub const SYS_setdomainname = 121; | |
| 136 | pub const SYS_uname = 122; | |
| 137 | pub const SYS_modify_ldt = 123; | |
| 138 | pub const SYS_adjtimex = 124; | |
| 139 | pub const SYS_mprotect = 125; | |
| 140 | pub const SYS_sigprocmask = 126; | |
| 141 | pub const SYS_create_module = 127; | |
| 142 | pub const SYS_init_module = 128; | |
| 143 | pub const SYS_delete_module = 129; | |
| 144 | pub const SYS_get_kernel_syms = 130; | |
| 145 | pub const SYS_quotactl = 131; | |
| 146 | pub const SYS_getpgid = 132; | |
| 147 | pub const SYS_fchdir = 133; | |
| 148 | pub const SYS_bdflush = 134; | |
| 149 | pub const SYS_sysfs = 135; | |
| 150 | pub const SYS_personality = 136; | |
| 151 | pub const SYS_afs_syscall = 137; | |
| 152 | pub const SYS_setfsuid = 138; | |
| 153 | pub const SYS_setfsgid = 139; | |
| 154 | pub const SYS__llseek = 140; | |
| 155 | pub const SYS_getdents = 141; | |
| 156 | pub const SYS__newselect = 142; | |
| 157 | pub const SYS_flock = 143; | |
| 158 | pub const SYS_msync = 144; | |
| 159 | pub const SYS_readv = 145; | |
| 160 | pub const SYS_writev = 146; | |
| 161 | pub const SYS_getsid = 147; | |
| 162 | pub const SYS_fdatasync = 148; | |
| 163 | pub const SYS__sysctl = 149; | |
| 164 | pub const SYS_mlock = 150; | |
| 165 | pub const SYS_munlock = 151; | |
| 166 | pub const SYS_mlockall = 152; | |
| 167 | pub const SYS_munlockall = 153; | |
| 168 | pub const SYS_sched_setparam = 154; | |
| 169 | pub const SYS_sched_getparam = 155; | |
| 170 | pub const SYS_sched_setscheduler = 156; | |
| 171 | pub const SYS_sched_getscheduler = 157; | |
| 172 | pub const SYS_sched_yield = 158; | |
| 173 | pub const SYS_sched_get_priority_max = 159; | |
| 174 | pub const SYS_sched_get_priority_min = 160; | |
| 175 | pub const SYS_sched_rr_get_interval = 161; | |
| 176 | pub const SYS_nanosleep = 162; | |
| 177 | pub const SYS_mremap = 163; | |
| 178 | pub const SYS_setresuid = 164; | |
| 179 | pub const SYS_getresuid = 165; | |
| 180 | pub const SYS_vm86 = 166; | |
| 181 | pub const SYS_query_module = 167; | |
| 182 | pub const SYS_poll = 168; | |
| 183 | pub const SYS_nfsservctl = 169; | |
| 184 | pub const SYS_setresgid = 170; | |
| 185 | pub const SYS_getresgid = 171; | |
| 186 | pub const SYS_prctl = 172; | |
| 187 | pub const SYS_rt_sigreturn = 173; | |
| 188 | pub const SYS_rt_sigaction = 174; | |
| 189 | pub const SYS_rt_sigprocmask = 175; | |
| 190 | pub const SYS_rt_sigpending = 176; | |
| 191 | pub const SYS_rt_sigtimedwait = 177; | |
| 192 | pub const SYS_rt_sigqueueinfo = 178; | |
| 193 | pub const SYS_rt_sigsuspend = 179; | |
| 194 | pub const SYS_pread64 = 180; | |
| 195 | pub const SYS_pwrite64 = 181; | |
| 196 | pub const SYS_chown = 182; | |
| 197 | pub const SYS_getcwd = 183; | |
| 198 | pub const SYS_capget = 184; | |
| 199 | pub const SYS_capset = 185; | |
| 200 | pub const SYS_sigaltstack = 186; | |
| 201 | pub const SYS_sendfile = 187; | |
| 202 | pub const SYS_getpmsg = 188; | |
| 203 | pub const SYS_putpmsg = 189; | |
| 204 | pub const SYS_vfork = 190; | |
| 205 | pub const SYS_ugetrlimit = 191; | |
| 206 | pub const SYS_mmap2 = 192; | |
| 207 | pub const SYS_truncate64 = 193; | |
| 208 | pub const SYS_ftruncate64 = 194; | |
| 209 | pub const SYS_stat64 = 195; | |
| 210 | pub const SYS_lstat64 = 196; | |
| 211 | pub const SYS_fstat64 = 197; | |
| 212 | pub const SYS_lchown32 = 198; | |
| 213 | pub const SYS_getuid32 = 199; | |
| 214 | pub const SYS_getgid32 = 200; | |
| 215 | pub const SYS_geteuid32 = 201; | |
| 216 | pub const SYS_getegid32 = 202; | |
| 217 | pub const SYS_setreuid32 = 203; | |
| 218 | pub const SYS_setregid32 = 204; | |
| 219 | pub const SYS_getgroups32 = 205; | |
| 220 | pub const SYS_setgroups32 = 206; | |
| 221 | pub const SYS_fchown32 = 207; | |
| 222 | pub const SYS_setresuid32 = 208; | |
| 223 | pub const SYS_getresuid32 = 209; | |
| 224 | pub const SYS_setresgid32 = 210; | |
| 225 | pub const SYS_getresgid32 = 211; | |
| 226 | pub const SYS_chown32 = 212; | |
| 227 | pub const SYS_setuid32 = 213; | |
| 228 | pub const SYS_setgid32 = 214; | |
| 229 | pub const SYS_setfsuid32 = 215; | |
| 230 | pub const SYS_setfsgid32 = 216; | |
| 231 | pub const SYS_pivot_root = 217; | |
| 232 | pub const SYS_mincore = 218; | |
| 233 | pub const SYS_madvise = 219; | |
| 234 | pub const SYS_getdents64 = 220; | |
| 235 | pub const SYS_fcntl64 = 221; | |
| 236 | pub const SYS_gettid = 224; | |
| 237 | pub const SYS_readahead = 225; | |
| 238 | pub const SYS_setxattr = 226; | |
| 239 | pub const SYS_lsetxattr = 227; | |
| 240 | pub const SYS_fsetxattr = 228; | |
| 241 | pub const SYS_getxattr = 229; | |
| 242 | pub const SYS_lgetxattr = 230; | |
| 243 | pub const SYS_fgetxattr = 231; | |
| 244 | pub const SYS_listxattr = 232; | |
| 245 | pub const SYS_llistxattr = 233; | |
| 246 | pub const SYS_flistxattr = 234; | |
| 247 | pub const SYS_removexattr = 235; | |
| 248 | pub const SYS_lremovexattr = 236; | |
| 249 | pub const SYS_fremovexattr = 237; | |
| 250 | pub const SYS_tkill = 238; | |
| 251 | pub const SYS_sendfile64 = 239; | |
| 252 | pub const SYS_futex = 240; | |
| 253 | pub const SYS_sched_setaffinity = 241; | |
| 254 | pub const SYS_sched_getaffinity = 242; | |
| 255 | pub const SYS_set_thread_area = 243; | |
| 256 | pub const SYS_get_thread_area = 244; | |
| 257 | pub const SYS_io_setup = 245; | |
| 258 | pub const SYS_io_destroy = 246; | |
| 259 | pub const SYS_io_getevents = 247; | |
| 260 | pub const SYS_io_submit = 248; | |
| 261 | pub const SYS_io_cancel = 249; | |
| 262 | pub const SYS_fadvise64 = 250; | |
| 263 | pub const SYS_exit_group = 252; | |
| 264 | pub const SYS_lookup_dcookie = 253; | |
| 265 | pub const SYS_epoll_create = 254; | |
| 266 | pub const SYS_epoll_ctl = 255; | |
| 267 | pub const SYS_epoll_wait = 256; | |
| 268 | pub const SYS_remap_file_pages = 257; | |
| 269 | pub const SYS_set_tid_address = 258; | |
| 270 | pub const SYS_timer_create = 259; | |
| 271 | pub const SYS_timer_settime = SYS_timer_create + 1; | |
| 272 | pub const SYS_timer_gettime = SYS_timer_create + 2; | |
| 273 | pub const SYS_timer_getoverrun = SYS_timer_create + 3; | |
| 274 | pub const SYS_timer_delete = SYS_timer_create + 4; | |
| 275 | pub const SYS_clock_settime = SYS_timer_create + 5; | |
| 276 | pub const SYS_clock_gettime = SYS_timer_create + 6; | |
| 277 | pub const SYS_clock_getres = SYS_timer_create + 7; | |
| 278 | pub const SYS_clock_nanosleep = SYS_timer_create + 8; | |
| 279 | pub const SYS_statfs64 = 268; | |
| 280 | pub const SYS_fstatfs64 = 269; | |
| 281 | pub const SYS_tgkill = 270; | |
| 282 | pub const SYS_utimes = 271; | |
| 283 | pub const SYS_fadvise64_64 = 272; | |
| 284 | pub const SYS_vserver = 273; | |
| 285 | pub const SYS_mbind = 274; | |
| 286 | pub const SYS_get_mempolicy = 275; | |
| 287 | pub const SYS_set_mempolicy = 276; | |
| 288 | pub const SYS_mq_open = 277; | |
| 289 | pub const SYS_mq_unlink = SYS_mq_open + 1; | |
| 290 | pub const SYS_mq_timedsend = SYS_mq_open + 2; | |
| 291 | pub const SYS_mq_timedreceive = SYS_mq_open + 3; | |
| 292 | pub const SYS_mq_notify = SYS_mq_open + 4; | |
| 293 | pub const SYS_mq_getsetattr = SYS_mq_open + 5; | |
| 294 | pub const SYS_kexec_load = 283; | |
| 295 | pub const SYS_waitid = 284; | |
| 296 | pub const SYS_add_key = 286; | |
| 297 | pub const SYS_request_key = 287; | |
| 298 | pub const SYS_keyctl = 288; | |
| 299 | pub const SYS_ioprio_set = 289; | |
| 300 | pub const SYS_ioprio_get = 290; | |
| 301 | pub const SYS_inotify_init = 291; | |
| 302 | pub const SYS_inotify_add_watch = 292; | |
| 303 | pub const SYS_inotify_rm_watch = 293; | |
| 304 | pub const SYS_migrate_pages = 294; | |
| 305 | pub const SYS_openat = 295; | |
| 306 | pub const SYS_mkdirat = 296; | |
| 307 | pub const SYS_mknodat = 297; | |
| 308 | pub const SYS_fchownat = 298; | |
| 309 | pub const SYS_futimesat = 299; | |
| 310 | pub const SYS_fstatat64 = 300; | |
| 311 | pub const SYS_unlinkat = 301; | |
| 312 | pub const SYS_renameat = 302; | |
| 313 | pub const SYS_linkat = 303; | |
| 314 | pub const SYS_symlinkat = 304; | |
| 315 | pub const SYS_readlinkat = 305; | |
| 316 | pub const SYS_fchmodat = 306; | |
| 317 | pub const SYS_faccessat = 307; | |
| 318 | pub const SYS_pselect6 = 308; | |
| 319 | pub const SYS_ppoll = 309; | |
| 320 | pub const SYS_unshare = 310; | |
| 321 | pub const SYS_set_robust_list = 311; | |
| 322 | pub const SYS_get_robust_list = 312; | |
| 323 | pub const SYS_splice = 313; | |
| 324 | pub const SYS_sync_file_range = 314; | |
| 325 | pub const SYS_tee = 315; | |
| 326 | pub const SYS_vmsplice = 316; | |
| 327 | pub const SYS_move_pages = 317; | |
| 328 | pub const SYS_getcpu = 318; | |
| 329 | pub const SYS_epoll_pwait = 319; | |
| 330 | pub const SYS_utimensat = 320; | |
| 331 | pub const SYS_signalfd = 321; | |
| 332 | pub const SYS_timerfd_create = 322; | |
| 333 | pub const SYS_eventfd = 323; | |
| 334 | pub const SYS_fallocate = 324; | |
| 335 | pub const SYS_timerfd_settime = 325; | |
| 336 | pub const SYS_timerfd_gettime = 326; | |
| 337 | pub const SYS_signalfd4 = 327; | |
| 338 | pub const SYS_eventfd2 = 328; | |
| 339 | pub const SYS_epoll_create1 = 329; | |
| 340 | pub const SYS_dup3 = 330; | |
| 341 | pub const SYS_pipe2 = 331; | |
| 342 | pub const SYS_inotify_init1 = 332; | |
| 343 | pub const SYS_preadv = 333; | |
| 344 | pub const SYS_pwritev = 334; | |
| 345 | pub const SYS_rt_tgsigqueueinfo = 335; | |
| 346 | pub const SYS_perf_event_open = 336; | |
| 347 | pub const SYS_recvmmsg = 337; | |
| 348 | pub const SYS_fanotify_init = 338; | |
| 349 | pub const SYS_fanotify_mark = 339; | |
| 350 | pub const SYS_prlimit64 = 340; | |
| 351 | pub const SYS_name_to_handle_at = 341; | |
| 352 | pub const SYS_open_by_handle_at = 342; | |
| 353 | pub const SYS_clock_adjtime = 343; | |
| 354 | pub const SYS_syncfs = 344; | |
| 355 | pub const SYS_sendmmsg = 345; | |
| 356 | pub const SYS_setns = 346; | |
| 357 | pub const SYS_process_vm_readv = 347; | |
| 358 | pub const SYS_process_vm_writev = 348; | |
| 359 | pub const SYS_kcmp = 349; | |
| 360 | pub const SYS_finit_module = 350; | |
| 361 | pub const SYS_sched_setattr = 351; | |
| 362 | pub const SYS_sched_getattr = 352; | |
| 363 | pub const SYS_renameat2 = 353; | |
| 364 | pub const SYS_seccomp = 354; | |
| 365 | pub const SYS_getrandom = 355; | |
| 366 | pub const SYS_memfd_create = 356; | |
| 367 | pub const SYS_bpf = 357; | |
| 368 | pub const SYS_execveat = 358; | |
| 369 | pub const SYS_socket = 359; | |
| 370 | pub const SYS_socketpair = 360; | |
| 371 | pub const SYS_bind = 361; | |
| 372 | pub const SYS_connect = 362; | |
| 373 | pub const SYS_listen = 363; | |
| 374 | pub const SYS_accept4 = 364; | |
| 375 | pub const SYS_getsockopt = 365; | |
| 376 | pub const SYS_setsockopt = 366; | |
| 377 | pub const SYS_getsockname = 367; | |
| 378 | pub const SYS_getpeername = 368; | |
| 379 | pub const SYS_sendto = 369; | |
| 380 | pub const SYS_sendmsg = 370; | |
| 381 | pub const SYS_recvfrom = 371; | |
| 382 | pub const SYS_recvmsg = 372; | |
| 383 | pub const SYS_shutdown = 373; | |
| 384 | pub const SYS_userfaultfd = 374; | |
| 385 | pub const SYS_membarrier = 375; | |
| 386 | pub const SYS_mlock2 = 376; | |
| 387 | pub const SYS_copy_file_range = 377; | |
| 388 | pub const SYS_preadv2 = 378; | |
| 389 | pub const SYS_pwritev2 = 379; | |
| 390 | pub const SYS_pkey_mprotect = 380; | |
| 391 | pub const SYS_pkey_alloc = 381; | |
| 392 | pub const SYS_pkey_free = 382; | |
| 393 | pub const SYS_statx = 383; | |
| 394 | pub const SYS_arch_prctl = 384; | |
| 395 | pub const SYS_io_pgetevents = 385; | |
| 396 | pub const SYS_rseq = 386; | |
| 397 | pub const SYS_semget = 393; | |
| 398 | pub const SYS_semctl = 394; | |
| 399 | pub const SYS_shmget = 395; | |
| 400 | pub const SYS_shmctl = 396; | |
| 401 | pub const SYS_shmat = 397; | |
| 402 | pub const SYS_shmdt = 398; | |
| 403 | pub const SYS_msgget = 399; | |
| 404 | pub const SYS_msgsnd = 400; | |
| 405 | pub const SYS_msgrcv = 401; | |
| 406 | pub const SYS_msgctl = 402; | |
| 407 | pub const SYS_clock_gettime64 = 403; | |
| 408 | pub const SYS_clock_settime64 = 404; | |
| 409 | pub const SYS_clock_adjtime64 = 405; | |
| 410 | pub const SYS_clock_getres_time64 = 406; | |
| 411 | pub const SYS_clock_nanosleep_time64 = 407; | |
| 412 | pub const SYS_timer_gettime64 = 408; | |
| 413 | pub const SYS_timer_settime64 = 409; | |
| 414 | pub const SYS_timerfd_gettime64 = 410; | |
| 415 | pub const SYS_timerfd_settime64 = 411; | |
| 416 | pub const SYS_utimensat_time64 = 412; | |
| 417 | pub const SYS_pselect6_time64 = 413; | |
| 418 | pub const SYS_ppoll_time64 = 414; | |
| 419 | pub const SYS_io_pgetevents_time64 = 416; | |
| 420 | pub const SYS_recvmmsg_time64 = 417; | |
| 421 | pub const SYS_mq_timedsend_time64 = 418; | |
| 422 | pub const SYS_mq_timedreceive_time64 = 419; | |
| 423 | pub const SYS_semtimedop_time64 = 420; | |
| 424 | pub const SYS_rt_sigtimedwait_time64 = 421; | |
| 425 | pub const SYS_futex_time64 = 422; | |
| 426 | pub const SYS_sched_rr_get_interval_time64 = 423; | |
| 427 | pub const SYS_pidfd_send_signal = 424; | |
| 428 | pub const SYS_io_uring_setup = 425; | |
| 429 | pub const SYS_io_uring_enter = 426; | |
| 430 | pub const SYS_io_uring_register = 427; | |
| 431 | pub const SYS_open_tree = 428; | |
| 432 | pub const SYS_move_mount = 429; | |
| 433 | pub const SYS_fsopen = 430; | |
| 434 | pub const SYS_fsconfig = 431; | |
| 435 | pub const SYS_fsmount = 432; | |
| 436 | pub const SYS_fspick = 433; | |
| 437 | pub const SYS_openat2 = 437; | |
| 438 | pub const SYS_pidfd_getfd = 438; | |
| 14 | pub const SYS = extern enum(usize) { | |
| 15 | restart_syscall = 0, | |
| 16 | exit = 1, | |
| 17 | fork = 2, | |
| 18 | read = 3, | |
| 19 | write = 4, | |
| 20 | open = 5, | |
| 21 | close = 6, | |
| 22 | waitpid = 7, | |
| 23 | creat = 8, | |
| 24 | link = 9, | |
| 25 | unlink = 10, | |
| 26 | execve = 11, | |
| 27 | chdir = 12, | |
| 28 | time = 13, | |
| 29 | mknod = 14, | |
| 30 | chmod = 15, | |
| 31 | lchown = 16, | |
| 32 | @"break" = 17, | |
| 33 | oldstat = 18, | |
| 34 | lseek = 19, | |
| 35 | getpid = 20, | |
| 36 | mount = 21, | |
| 37 | umount = 22, | |
| 38 | setuid = 23, | |
| 39 | getuid = 24, | |
| 40 | stime = 25, | |
| 41 | ptrace = 26, | |
| 42 | alarm = 27, | |
| 43 | oldfstat = 28, | |
| 44 | pause = 29, | |
| 45 | utime = 30, | |
| 46 | stty = 31, | |
| 47 | gtty = 32, | |
| 48 | access = 33, | |
| 49 | nice = 34, | |
| 50 | ftime = 35, | |
| 51 | sync = 36, | |
| 52 | kill = 37, | |
| 53 | rename = 38, | |
| 54 | mkdir = 39, | |
| 55 | rmdir = 40, | |
| 56 | dup = 41, | |
| 57 | pipe = 42, | |
| 58 | times = 43, | |
| 59 | prof = 44, | |
| 60 | brk = 45, | |
| 61 | setgid = 46, | |
| 62 | getgid = 47, | |
| 63 | signal = 48, | |
| 64 | geteuid = 49, | |
| 65 | getegid = 50, | |
| 66 | acct = 51, | |
| 67 | umount2 = 52, | |
| 68 | lock = 53, | |
| 69 | ioctl = 54, | |
| 70 | fcntl = 55, | |
| 71 | mpx = 56, | |
| 72 | setpgid = 57, | |
| 73 | ulimit = 58, | |
| 74 | oldolduname = 59, | |
| 75 | umask = 60, | |
| 76 | chroot = 61, | |
| 77 | ustat = 62, | |
| 78 | dup2 = 63, | |
| 79 | getppid = 64, | |
| 80 | getpgrp = 65, | |
| 81 | setsid = 66, | |
| 82 | sigaction = 67, | |
| 83 | sgetmask = 68, | |
| 84 | ssetmask = 69, | |
| 85 | setreuid = 70, | |
| 86 | setregid = 71, | |
| 87 | sigsuspend = 72, | |
| 88 | sigpending = 73, | |
| 89 | sethostname = 74, | |
| 90 | setrlimit = 75, | |
| 91 | getrlimit = 76, | |
| 92 | getrusage = 77, | |
| 93 | gettimeofday = 78, | |
| 94 | settimeofday = 79, | |
| 95 | getgroups = 80, | |
| 96 | setgroups = 81, | |
| 97 | select = 82, | |
| 98 | symlink = 83, | |
| 99 | oldlstat = 84, | |
| 100 | readlink = 85, | |
| 101 | uselib = 86, | |
| 102 | swapon = 87, | |
| 103 | reboot = 88, | |
| 104 | readdir = 89, | |
| 105 | mmap = 90, | |
| 106 | munmap = 91, | |
| 107 | truncate = 92, | |
| 108 | ftruncate = 93, | |
| 109 | fchmod = 94, | |
| 110 | fchown = 95, | |
| 111 | getpriority = 96, | |
| 112 | setpriority = 97, | |
| 113 | profil = 98, | |
| 114 | statfs = 99, | |
| 115 | fstatfs = 100, | |
| 116 | ioperm = 101, | |
| 117 | socketcall = 102, | |
| 118 | syslog = 103, | |
| 119 | setitimer = 104, | |
| 120 | getitimer = 105, | |
| 121 | stat = 106, | |
| 122 | lstat = 107, | |
| 123 | fstat = 108, | |
| 124 | olduname = 109, | |
| 125 | iopl = 110, | |
| 126 | vhangup = 111, | |
| 127 | idle = 112, | |
| 128 | vm86old = 113, | |
| 129 | wait4 = 114, | |
| 130 | swapoff = 115, | |
| 131 | sysinfo = 116, | |
| 132 | ipc = 117, | |
| 133 | fsync = 118, | |
| 134 | sigreturn = 119, | |
| 135 | clone = 120, | |
| 136 | setdomainname = 121, | |
| 137 | uname = 122, | |
| 138 | modify_ldt = 123, | |
| 139 | adjtimex = 124, | |
| 140 | mprotect = 125, | |
| 141 | sigprocmask = 126, | |
| 142 | create_module = 127, | |
| 143 | init_module = 128, | |
| 144 | delete_module = 129, | |
| 145 | get_kernel_syms = 130, | |
| 146 | quotactl = 131, | |
| 147 | getpgid = 132, | |
| 148 | fchdir = 133, | |
| 149 | bdflush = 134, | |
| 150 | sysfs = 135, | |
| 151 | personality = 136, | |
| 152 | afs_syscall = 137, | |
| 153 | setfsuid = 138, | |
| 154 | setfsgid = 139, | |
| 155 | _llseek = 140, | |
| 156 | getdents = 141, | |
| 157 | _newselect = 142, | |
| 158 | flock = 143, | |
| 159 | msync = 144, | |
| 160 | readv = 145, | |
| 161 | writev = 146, | |
| 162 | getsid = 147, | |
| 163 | fdatasync = 148, | |
| 164 | _sysctl = 149, | |
| 165 | mlock = 150, | |
| 166 | munlock = 151, | |
| 167 | mlockall = 152, | |
| 168 | munlockall = 153, | |
| 169 | sched_setparam = 154, | |
| 170 | sched_getparam = 155, | |
| 171 | sched_setscheduler = 156, | |
| 172 | sched_getscheduler = 157, | |
| 173 | sched_yield = 158, | |
| 174 | sched_get_priority_max = 159, | |
| 175 | sched_get_priority_min = 160, | |
| 176 | sched_rr_get_interval = 161, | |
| 177 | nanosleep = 162, | |
| 178 | mremap = 163, | |
| 179 | setresuid = 164, | |
| 180 | getresuid = 165, | |
| 181 | vm86 = 166, | |
| 182 | query_module = 167, | |
| 183 | poll = 168, | |
| 184 | nfsservctl = 169, | |
| 185 | setresgid = 170, | |
| 186 | getresgid = 171, | |
| 187 | prctl = 172, | |
| 188 | rt_sigreturn = 173, | |
| 189 | rt_sigaction = 174, | |
| 190 | rt_sigprocmask = 175, | |
| 191 | rt_sigpending = 176, | |
| 192 | rt_sigtimedwait = 177, | |
| 193 | rt_sigqueueinfo = 178, | |
| 194 | rt_sigsuspend = 179, | |
| 195 | pread64 = 180, | |
| 196 | pwrite64 = 181, | |
| 197 | chown = 182, | |
| 198 | getcwd = 183, | |
| 199 | capget = 184, | |
| 200 | capset = 185, | |
| 201 | sigaltstack = 186, | |
| 202 | sendfile = 187, | |
| 203 | getpmsg = 188, | |
| 204 | putpmsg = 189, | |
| 205 | vfork = 190, | |
| 206 | ugetrlimit = 191, | |
| 207 | mmap2 = 192, | |
| 208 | truncate64 = 193, | |
| 209 | ftruncate64 = 194, | |
| 210 | stat64 = 195, | |
| 211 | lstat64 = 196, | |
| 212 | fstat64 = 197, | |
| 213 | lchown32 = 198, | |
| 214 | getuid32 = 199, | |
| 215 | getgid32 = 200, | |
| 216 | geteuid32 = 201, | |
| 217 | getegid32 = 202, | |
| 218 | setreuid32 = 203, | |
| 219 | setregid32 = 204, | |
| 220 | getgroups32 = 205, | |
| 221 | setgroups32 = 206, | |
| 222 | fchown32 = 207, | |
| 223 | setresuid32 = 208, | |
| 224 | getresuid32 = 209, | |
| 225 | setresgid32 = 210, | |
| 226 | getresgid32 = 211, | |
| 227 | chown32 = 212, | |
| 228 | setuid32 = 213, | |
| 229 | setgid32 = 214, | |
| 230 | setfsuid32 = 215, | |
| 231 | setfsgid32 = 216, | |
| 232 | pivot_root = 217, | |
| 233 | mincore = 218, | |
| 234 | madvise = 219, | |
| 235 | getdents64 = 220, | |
| 236 | fcntl64 = 221, | |
| 237 | gettid = 224, | |
| 238 | readahead = 225, | |
| 239 | setxattr = 226, | |
| 240 | lsetxattr = 227, | |
| 241 | fsetxattr = 228, | |
| 242 | getxattr = 229, | |
| 243 | lgetxattr = 230, | |
| 244 | fgetxattr = 231, | |
| 245 | listxattr = 232, | |
| 246 | llistxattr = 233, | |
| 247 | flistxattr = 234, | |
| 248 | removexattr = 235, | |
| 249 | lremovexattr = 236, | |
| 250 | fremovexattr = 237, | |
| 251 | tkill = 238, | |
| 252 | sendfile64 = 239, | |
| 253 | futex = 240, | |
| 254 | sched_setaffinity = 241, | |
| 255 | sched_getaffinity = 242, | |
| 256 | set_thread_area = 243, | |
| 257 | get_thread_area = 244, | |
| 258 | io_setup = 245, | |
| 259 | io_destroy = 246, | |
| 260 | io_getevents = 247, | |
| 261 | io_submit = 248, | |
| 262 | io_cancel = 249, | |
| 263 | fadvise64 = 250, | |
| 264 | exit_group = 252, | |
| 265 | lookup_dcookie = 253, | |
| 266 | epoll_create = 254, | |
| 267 | epoll_ctl = 255, | |
| 268 | epoll_wait = 256, | |
| 269 | remap_file_pages = 257, | |
| 270 | set_tid_address = 258, | |
| 271 | timer_create = 259, | |
| 272 | timer_settime, // SYS_timer_create + 1 | |
| 273 | timer_gettime, // SYS_timer_create + 2 | |
| 274 | timer_getoverrun, // SYS_timer_create + 3 | |
| 275 | timer_delete, // SYS_timer_create + 4 | |
| 276 | clock_settime, // SYS_timer_create + 5 | |
| 277 | clock_gettime, // SYS_timer_create + 6 | |
| 278 | clock_getres, // SYS_timer_create + 7 | |
| 279 | clock_nanosleep, // SYS_timer_create + 8 | |
| 280 | statfs64 = 268, | |
| 281 | fstatfs64 = 269, | |
| 282 | tgkill = 270, | |
| 283 | utimes = 271, | |
| 284 | fadvise64_64 = 272, | |
| 285 | vserver = 273, | |
| 286 | mbind = 274, | |
| 287 | get_mempolicy = 275, | |
| 288 | set_mempolicy = 276, | |
| 289 | mq_open = 277, | |
| 290 | mq_unlink, // SYS_mq_open + 1 | |
| 291 | mq_timedsend, // SYS_mq_open + 2 | |
| 292 | mq_timedreceive, // SYS_mq_open + 3 | |
| 293 | mq_notify, // SYS_mq_open + 4 | |
| 294 | mq_getsetattr, // SYS_mq_open + 5 | |
| 295 | kexec_load = 283, | |
| 296 | waitid = 284, | |
| 297 | add_key = 286, | |
| 298 | request_key = 287, | |
| 299 | keyctl = 288, | |
| 300 | ioprio_set = 289, | |
| 301 | ioprio_get = 290, | |
| 302 | inotify_init = 291, | |
| 303 | inotify_add_watch = 292, | |
| 304 | inotify_rm_watch = 293, | |
| 305 | migrate_pages = 294, | |
| 306 | openat = 295, | |
| 307 | mkdirat = 296, | |
| 308 | mknodat = 297, | |
| 309 | fchownat = 298, | |
| 310 | futimesat = 299, | |
| 311 | fstatat64 = 300, | |
| 312 | unlinkat = 301, | |
| 313 | renameat = 302, | |
| 314 | linkat = 303, | |
| 315 | symlinkat = 304, | |
| 316 | readlinkat = 305, | |
| 317 | fchmodat = 306, | |
| 318 | faccessat = 307, | |
| 319 | pselect6 = 308, | |
| 320 | ppoll = 309, | |
| 321 | unshare = 310, | |
| 322 | set_robust_list = 311, | |
| 323 | get_robust_list = 312, | |
| 324 | splice = 313, | |
| 325 | sync_file_range = 314, | |
| 326 | tee = 315, | |
| 327 | vmsplice = 316, | |
| 328 | move_pages = 317, | |
| 329 | getcpu = 318, | |
| 330 | epoll_pwait = 319, | |
| 331 | utimensat = 320, | |
| 332 | signalfd = 321, | |
| 333 | timerfd_create = 322, | |
| 334 | eventfd = 323, | |
| 335 | fallocate = 324, | |
| 336 | timerfd_settime = 325, | |
| 337 | timerfd_gettime = 326, | |
| 338 | signalfd4 = 327, | |
| 339 | eventfd2 = 328, | |
| 340 | epoll_create1 = 329, | |
| 341 | dup3 = 330, | |
| 342 | pipe2 = 331, | |
| 343 | inotify_init1 = 332, | |
| 344 | preadv = 333, | |
| 345 | pwritev = 334, | |
| 346 | rt_tgsigqueueinfo = 335, | |
| 347 | perf_event_open = 336, | |
| 348 | recvmmsg = 337, | |
| 349 | fanotify_init = 338, | |
| 350 | fanotify_mark = 339, | |
| 351 | prlimit64 = 340, | |
| 352 | name_to_handle_at = 341, | |
| 353 | open_by_handle_at = 342, | |
| 354 | clock_adjtime = 343, | |
| 355 | syncfs = 344, | |
| 356 | sendmmsg = 345, | |
| 357 | setns = 346, | |
| 358 | process_vm_readv = 347, | |
| 359 | process_vm_writev = 348, | |
| 360 | kcmp = 349, | |
| 361 | finit_module = 350, | |
| 362 | sched_setattr = 351, | |
| 363 | sched_getattr = 352, | |
| 364 | renameat2 = 353, | |
| 365 | seccomp = 354, | |
| 366 | getrandom = 355, | |
| 367 | memfd_create = 356, | |
| 368 | bpf = 357, | |
| 369 | execveat = 358, | |
| 370 | socket = 359, | |
| 371 | socketpair = 360, | |
| 372 | bind = 361, | |
| 373 | connect = 362, | |
| 374 | listen = 363, | |
| 375 | accept4 = 364, | |
| 376 | getsockopt = 365, | |
| 377 | setsockopt = 366, | |
| 378 | getsockname = 367, | |
| 379 | getpeername = 368, | |
| 380 | sendto = 369, | |
| 381 | sendmsg = 370, | |
| 382 | recvfrom = 371, | |
| 383 | recvmsg = 372, | |
| 384 | shutdown = 373, | |
| 385 | userfaultfd = 374, | |
| 386 | membarrier = 375, | |
| 387 | mlock2 = 376, | |
| 388 | copy_file_range = 377, | |
| 389 | preadv2 = 378, | |
| 390 | pwritev2 = 379, | |
| 391 | pkey_mprotect = 380, | |
| 392 | pkey_alloc = 381, | |
| 393 | pkey_free = 382, | |
| 394 | statx = 383, | |
| 395 | arch_prctl = 384, | |
| 396 | io_pgetevents = 385, | |
| 397 | rseq = 386, | |
| 398 | semget = 393, | |
| 399 | semctl = 394, | |
| 400 | shmget = 395, | |
| 401 | shmctl = 396, | |
| 402 | shmat = 397, | |
| 403 | shmdt = 398, | |
| 404 | msgget = 399, | |
| 405 | msgsnd = 400, | |
| 406 | msgrcv = 401, | |
| 407 | msgctl = 402, | |
| 408 | clock_gettime64 = 403, | |
| 409 | clock_settime64 = 404, | |
| 410 | clock_adjtime64 = 405, | |
| 411 | clock_getres_time64 = 406, | |
| 412 | clock_nanosleep_time64 = 407, | |
| 413 | timer_gettime64 = 408, | |
| 414 | timer_settime64 = 409, | |
| 415 | timerfd_gettime64 = 410, | |
| 416 | timerfd_settime64 = 411, | |
| 417 | utimensat_time64 = 412, | |
| 418 | pselect6_time64 = 413, | |
| 419 | ppoll_time64 = 414, | |
| 420 | io_pgetevents_time64 = 416, | |
| 421 | recvmmsg_time64 = 417, | |
| 422 | mq_timedsend_time64 = 418, | |
| 423 | mq_timedreceive_time64 = 419, | |
| 424 | semtimedop_time64 = 420, | |
| 425 | rt_sigtimedwait_time64 = 421, | |
| 426 | futex_time64 = 422, | |
| 427 | sched_rr_get_interval_time64 = 423, | |
| 428 | pidfd_send_signal = 424, | |
| 429 | io_uring_setup = 425, | |
| 430 | io_uring_enter = 426, | |
| 431 | io_uring_register = 427, | |
| 432 | open_tree = 428, | |
| 433 | move_mount = 429, | |
| 434 | fsopen = 430, | |
| 435 | fsconfig = 431, | |
| 436 | fsmount = 432, | |
| 437 | fspick = 433, | |
| 438 | openat2 = 437, | |
| 439 | pidfd_getfd = 438, | |
| 440 | ||
| 441 | _, | |
| 442 | }; | |
| 439 | 443 | |
| 440 | 444 | pub const O_CREAT = 0o100; |
| 441 | 445 | pub const O_EXCL = 0o200; |
lib/std/os/bits/linux/mipsel.zig+376-371| ... | ... | @@ -6,377 +6,382 @@ const iovec_const = linux.iovec_const; |
| 6 | 6 | const uid_t = linux.uid_t; |
| 7 | 7 | const gid_t = linux.gid_t; |
| 8 | 8 | |
| 9 | pub const SYS_Linux = 4000; | |
| 10 | pub const SYS_syscall = (SYS_Linux + 0); | |
| 11 | pub const SYS_exit = (SYS_Linux + 1); | |
| 12 | pub const SYS_fork = (SYS_Linux + 2); | |
| 13 | pub const SYS_read = (SYS_Linux + 3); | |
| 14 | pub const SYS_write = (SYS_Linux + 4); | |
| 15 | pub const SYS_open = (SYS_Linux + 5); | |
| 16 | pub const SYS_close = (SYS_Linux + 6); | |
| 17 | pub const SYS_waitpid = (SYS_Linux + 7); | |
| 18 | pub const SYS_creat = (SYS_Linux + 8); | |
| 19 | pub const SYS_link = (SYS_Linux + 9); | |
| 20 | pub const SYS_unlink = (SYS_Linux + 10); | |
| 21 | pub const SYS_execve = (SYS_Linux + 11); | |
| 22 | pub const SYS_chdir = (SYS_Linux + 12); | |
| 23 | pub const SYS_time = (SYS_Linux + 13); | |
| 24 | pub const SYS_mknod = (SYS_Linux + 14); | |
| 25 | pub const SYS_chmod = (SYS_Linux + 15); | |
| 26 | pub const SYS_lchown = (SYS_Linux + 16); | |
| 27 | pub const SYS_break = (SYS_Linux + 17); | |
| 28 | pub const SYS_unused18 = (SYS_Linux + 18); | |
| 29 | pub const SYS_lseek = (SYS_Linux + 19); | |
| 30 | pub const SYS_getpid = (SYS_Linux + 20); | |
| 31 | pub const SYS_mount = (SYS_Linux + 21); | |
| 32 | pub const SYS_umount = (SYS_Linux + 22); | |
| 33 | pub const SYS_setuid = (SYS_Linux + 23); | |
| 34 | pub const SYS_getuid = (SYS_Linux + 24); | |
| 35 | pub const SYS_stime = (SYS_Linux + 25); | |
| 36 | pub const SYS_ptrace = (SYS_Linux + 26); | |
| 37 | pub const SYS_alarm = (SYS_Linux + 27); | |
| 38 | pub const SYS_unused28 = (SYS_Linux + 28); | |
| 39 | pub const SYS_pause = (SYS_Linux + 29); | |
| 40 | pub const SYS_utime = (SYS_Linux + 30); | |
| 41 | pub const SYS_stty = (SYS_Linux + 31); | |
| 42 | pub const SYS_gtty = (SYS_Linux + 32); | |
| 43 | pub const SYS_access = (SYS_Linux + 33); | |
| 44 | pub const SYS_nice = (SYS_Linux + 34); | |
| 45 | pub const SYS_ftime = (SYS_Linux + 35); | |
| 46 | pub const SYS_sync = (SYS_Linux + 36); | |
| 47 | pub const SYS_kill = (SYS_Linux + 37); | |
| 48 | pub const SYS_rename = (SYS_Linux + 38); | |
| 49 | pub const SYS_mkdir = (SYS_Linux + 39); | |
| 50 | pub const SYS_rmdir = (SYS_Linux + 40); | |
| 51 | pub const SYS_dup = (SYS_Linux + 41); | |
| 52 | pub const SYS_pipe = (SYS_Linux + 42); | |
| 53 | pub const SYS_times = (SYS_Linux + 43); | |
| 54 | pub const SYS_prof = (SYS_Linux + 44); | |
| 55 | pub const SYS_brk = (SYS_Linux + 45); | |
| 56 | pub const SYS_setgid = (SYS_Linux + 46); | |
| 57 | pub const SYS_getgid = (SYS_Linux + 47); | |
| 58 | pub const SYS_signal = (SYS_Linux + 48); | |
| 59 | pub const SYS_geteuid = (SYS_Linux + 49); | |
| 60 | pub const SYS_getegid = (SYS_Linux + 50); | |
| 61 | pub const SYS_acct = (SYS_Linux + 51); | |
| 62 | pub const SYS_umount2 = (SYS_Linux + 52); | |
| 63 | pub const SYS_lock = (SYS_Linux + 53); | |
| 64 | pub const SYS_ioctl = (SYS_Linux + 54); | |
| 65 | pub const SYS_fcntl = (SYS_Linux + 55); | |
| 66 | pub const SYS_mpx = (SYS_Linux + 56); | |
| 67 | pub const SYS_setpgid = (SYS_Linux + 57); | |
| 68 | pub const SYS_ulimit = (SYS_Linux + 58); | |
| 69 | pub const SYS_unused59 = (SYS_Linux + 59); | |
| 70 | pub const SYS_umask = (SYS_Linux + 60); | |
| 71 | pub const SYS_chroot = (SYS_Linux + 61); | |
| 72 | pub const SYS_ustat = (SYS_Linux + 62); | |
| 73 | pub const SYS_dup2 = (SYS_Linux + 63); | |
| 74 | pub const SYS_getppid = (SYS_Linux + 64); | |
| 75 | pub const SYS_getpgrp = (SYS_Linux + 65); | |
| 76 | pub const SYS_setsid = (SYS_Linux + 66); | |
| 77 | pub const SYS_sigaction = (SYS_Linux + 67); | |
| 78 | pub const SYS_sgetmask = (SYS_Linux + 68); | |
| 79 | pub const SYS_ssetmask = (SYS_Linux + 69); | |
| 80 | pub const SYS_setreuid = (SYS_Linux + 70); | |
| 81 | pub const SYS_setregid = (SYS_Linux + 71); | |
| 82 | pub const SYS_sigsuspend = (SYS_Linux + 72); | |
| 83 | pub const SYS_sigpending = (SYS_Linux + 73); | |
| 84 | pub const SYS_sethostname = (SYS_Linux + 74); | |
| 85 | pub const SYS_setrlimit = (SYS_Linux + 75); | |
| 86 | pub const SYS_getrlimit = (SYS_Linux + 76); | |
| 87 | pub const SYS_getrusage = (SYS_Linux + 77); | |
| 88 | pub const SYS_gettimeofday = (SYS_Linux + 78); | |
| 89 | pub const SYS_settimeofday = (SYS_Linux + 79); | |
| 90 | pub const SYS_getgroups = (SYS_Linux + 80); | |
| 91 | pub const SYS_setgroups = (SYS_Linux + 81); | |
| 92 | pub const SYS_reserved82 = (SYS_Linux + 82); | |
| 93 | pub const SYS_symlink = (SYS_Linux + 83); | |
| 94 | pub const SYS_unused84 = (SYS_Linux + 84); | |
| 95 | pub const SYS_readlink = (SYS_Linux + 85); | |
| 96 | pub const SYS_uselib = (SYS_Linux + 86); | |
| 97 | pub const SYS_swapon = (SYS_Linux + 87); | |
| 98 | pub const SYS_reboot = (SYS_Linux + 88); | |
| 99 | pub const SYS_readdir = (SYS_Linux + 89); | |
| 100 | pub const SYS_mmap = (SYS_Linux + 90); | |
| 101 | pub const SYS_munmap = (SYS_Linux + 91); | |
| 102 | pub const SYS_truncate = (SYS_Linux + 92); | |
| 103 | pub const SYS_ftruncate = (SYS_Linux + 93); | |
| 104 | pub const SYS_fchmod = (SYS_Linux + 94); | |
| 105 | pub const SYS_fchown = (SYS_Linux + 95); | |
| 106 | pub const SYS_getpriority = (SYS_Linux + 96); | |
| 107 | pub const SYS_setpriority = (SYS_Linux + 97); | |
| 108 | pub const SYS_profil = (SYS_Linux + 98); | |
| 109 | pub const SYS_statfs = (SYS_Linux + 99); | |
| 110 | pub const SYS_fstatfs = (SYS_Linux + 100); | |
| 111 | pub const SYS_ioperm = (SYS_Linux + 101); | |
| 112 | pub const SYS_socketcall = (SYS_Linux + 102); | |
| 113 | pub const SYS_syslog = (SYS_Linux + 103); | |
| 114 | pub const SYS_setitimer = (SYS_Linux + 104); | |
| 115 | pub const SYS_getitimer = (SYS_Linux + 105); | |
| 116 | pub const SYS_stat = (SYS_Linux + 106); | |
| 117 | pub const SYS_lstat = (SYS_Linux + 107); | |
| 118 | pub const SYS_fstat = (SYS_Linux + 108); | |
| 119 | pub const SYS_unused109 = (SYS_Linux + 109); | |
| 120 | pub const SYS_iopl = (SYS_Linux + 110); | |
| 121 | pub const SYS_vhangup = (SYS_Linux + 111); | |
| 122 | pub const SYS_idle = (SYS_Linux + 112); | |
| 123 | pub const SYS_vm86 = (SYS_Linux + 113); | |
| 124 | pub const SYS_wait4 = (SYS_Linux + 114); | |
| 125 | pub const SYS_swapoff = (SYS_Linux + 115); | |
| 126 | pub const SYS_sysinfo = (SYS_Linux + 116); | |
| 127 | pub const SYS_ipc = (SYS_Linux + 117); | |
| 128 | pub const SYS_fsync = (SYS_Linux + 118); | |
| 129 | pub const SYS_sigreturn = (SYS_Linux + 119); | |
| 130 | pub const SYS_clone = (SYS_Linux + 120); | |
| 131 | pub const SYS_setdomainname = (SYS_Linux + 121); | |
| 132 | pub const SYS_uname = (SYS_Linux + 122); | |
| 133 | pub const SYS_modify_ldt = (SYS_Linux + 123); | |
| 134 | pub const SYS_adjtimex = (SYS_Linux + 124); | |
| 135 | pub const SYS_mprotect = (SYS_Linux + 125); | |
| 136 | pub const SYS_sigprocmask = (SYS_Linux + 126); | |
| 137 | pub const SYS_create_module = (SYS_Linux + 127); | |
| 138 | pub const SYS_init_module = (SYS_Linux + 128); | |
| 139 | pub const SYS_delete_module = (SYS_Linux + 129); | |
| 140 | pub const SYS_get_kernel_syms = (SYS_Linux + 130); | |
| 141 | pub const SYS_quotactl = (SYS_Linux + 131); | |
| 142 | pub const SYS_getpgid = (SYS_Linux + 132); | |
| 143 | pub const SYS_fchdir = (SYS_Linux + 133); | |
| 144 | pub const SYS_bdflush = (SYS_Linux + 134); | |
| 145 | pub const SYS_sysfs = (SYS_Linux + 135); | |
| 146 | pub const SYS_personality = (SYS_Linux + 136); | |
| 147 | pub const SYS_afs_syscall = (SYS_Linux + 137); | |
| 148 | pub const SYS_setfsuid = (SYS_Linux + 138); | |
| 149 | pub const SYS_setfsgid = (SYS_Linux + 139); | |
| 150 | pub const SYS__llseek = (SYS_Linux + 140); | |
| 151 | pub const SYS_getdents = (SYS_Linux + 141); | |
| 152 | pub const SYS__newselect = (SYS_Linux + 142); | |
| 153 | pub const SYS_flock = (SYS_Linux + 143); | |
| 154 | pub const SYS_msync = (SYS_Linux + 144); | |
| 155 | pub const SYS_readv = (SYS_Linux + 145); | |
| 156 | pub const SYS_writev = (SYS_Linux + 146); | |
| 157 | pub const SYS_cacheflush = (SYS_Linux + 147); | |
| 158 | pub const SYS_cachectl = (SYS_Linux + 148); | |
| 159 | pub const SYS_sysmips = (SYS_Linux + 149); | |
| 160 | pub const SYS_unused150 = (SYS_Linux + 150); | |
| 161 | pub const SYS_getsid = (SYS_Linux + 151); | |
| 162 | pub const SYS_fdatasync = (SYS_Linux + 152); | |
| 163 | pub const SYS__sysctl = (SYS_Linux + 153); | |
| 164 | pub const SYS_mlock = (SYS_Linux + 154); | |
| 165 | pub const SYS_munlock = (SYS_Linux + 155); | |
| 166 | pub const SYS_mlockall = (SYS_Linux + 156); | |
| 167 | pub const SYS_munlockall = (SYS_Linux + 157); | |
| 168 | pub const SYS_sched_setparam = (SYS_Linux + 158); | |
| 169 | pub const SYS_sched_getparam = (SYS_Linux + 159); | |
| 170 | pub const SYS_sched_setscheduler = (SYS_Linux + 160); | |
| 171 | pub const SYS_sched_getscheduler = (SYS_Linux + 161); | |
| 172 | pub const SYS_sched_yield = (SYS_Linux + 162); | |
| 173 | pub const SYS_sched_get_priority_max = (SYS_Linux + 163); | |
| 174 | pub const SYS_sched_get_priority_min = (SYS_Linux + 164); | |
| 175 | pub const SYS_sched_rr_get_interval = (SYS_Linux + 165); | |
| 176 | pub const SYS_nanosleep = (SYS_Linux + 166); | |
| 177 | pub const SYS_mremap = (SYS_Linux + 167); | |
| 178 | pub const SYS_accept = (SYS_Linux + 168); | |
| 179 | pub const SYS_bind = (SYS_Linux + 169); | |
| 180 | pub const SYS_connect = (SYS_Linux + 170); | |
| 181 | pub const SYS_getpeername = (SYS_Linux + 171); | |
| 182 | pub const SYS_getsockname = (SYS_Linux + 172); | |
| 183 | pub const SYS_getsockopt = (SYS_Linux + 173); | |
| 184 | pub const SYS_listen = (SYS_Linux + 174); | |
| 185 | pub const SYS_recv = (SYS_Linux + 175); | |
| 186 | pub const SYS_recvfrom = (SYS_Linux + 176); | |
| 187 | pub const SYS_recvmsg = (SYS_Linux + 177); | |
| 188 | pub const SYS_send = (SYS_Linux + 178); | |
| 189 | pub const SYS_sendmsg = (SYS_Linux + 179); | |
| 190 | pub const SYS_sendto = (SYS_Linux + 180); | |
| 191 | pub const SYS_setsockopt = (SYS_Linux + 181); | |
| 192 | pub const SYS_shutdown = (SYS_Linux + 182); | |
| 193 | pub const SYS_socket = (SYS_Linux + 183); | |
| 194 | pub const SYS_socketpair = (SYS_Linux + 184); | |
| 195 | pub const SYS_setresuid = (SYS_Linux + 185); | |
| 196 | pub const SYS_getresuid = (SYS_Linux + 186); | |
| 197 | pub const SYS_query_module = (SYS_Linux + 187); | |
| 198 | pub const SYS_poll = (SYS_Linux + 188); | |
| 199 | pub const SYS_nfsservctl = (SYS_Linux + 189); | |
| 200 | pub const SYS_setresgid = (SYS_Linux + 190); | |
| 201 | pub const SYS_getresgid = (SYS_Linux + 191); | |
| 202 | pub const SYS_prctl = (SYS_Linux + 192); | |
| 203 | pub const SYS_rt_sigreturn = (SYS_Linux + 193); | |
| 204 | pub const SYS_rt_sigaction = (SYS_Linux + 194); | |
| 205 | pub const SYS_rt_sigprocmask = (SYS_Linux + 195); | |
| 206 | pub const SYS_rt_sigpending = (SYS_Linux + 196); | |
| 207 | pub const SYS_rt_sigtimedwait = (SYS_Linux + 197); | |
| 208 | pub const SYS_rt_sigqueueinfo = (SYS_Linux + 198); | |
| 209 | pub const SYS_rt_sigsuspend = (SYS_Linux + 199); | |
| 210 | pub const SYS_pread64 = (SYS_Linux + 200); | |
| 211 | pub const SYS_pwrite64 = (SYS_Linux + 201); | |
| 212 | pub const SYS_chown = (SYS_Linux + 202); | |
| 213 | pub const SYS_getcwd = (SYS_Linux + 203); | |
| 214 | pub const SYS_capget = (SYS_Linux + 204); | |
| 215 | pub const SYS_capset = (SYS_Linux + 205); | |
| 216 | pub const SYS_sigaltstack = (SYS_Linux + 206); | |
| 217 | pub const SYS_sendfile = (SYS_Linux + 207); | |
| 218 | pub const SYS_getpmsg = (SYS_Linux + 208); | |
| 219 | pub const SYS_putpmsg = (SYS_Linux + 209); | |
| 220 | pub const SYS_mmap2 = (SYS_Linux + 210); | |
| 221 | pub const SYS_truncate64 = (SYS_Linux + 211); | |
| 222 | pub const SYS_ftruncate64 = (SYS_Linux + 212); | |
| 223 | pub const SYS_stat64 = (SYS_Linux + 213); | |
| 224 | pub const SYS_lstat64 = (SYS_Linux + 214); | |
| 225 | pub const SYS_fstat64 = (SYS_Linux + 215); | |
| 226 | pub const SYS_pivot_root = (SYS_Linux + 216); | |
| 227 | pub const SYS_mincore = (SYS_Linux + 217); | |
| 228 | pub const SYS_madvise = (SYS_Linux + 218); | |
| 229 | pub const SYS_getdents64 = (SYS_Linux + 219); | |
| 230 | pub const SYS_fcntl64 = (SYS_Linux + 220); | |
| 231 | pub const SYS_reserved221 = (SYS_Linux + 221); | |
| 232 | pub const SYS_gettid = (SYS_Linux + 222); | |
| 233 | pub const SYS_readahead = (SYS_Linux + 223); | |
| 234 | pub const SYS_setxattr = (SYS_Linux + 224); | |
| 235 | pub const SYS_lsetxattr = (SYS_Linux + 225); | |
| 236 | pub const SYS_fsetxattr = (SYS_Linux + 226); | |
| 237 | pub const SYS_getxattr = (SYS_Linux + 227); | |
| 238 | pub const SYS_lgetxattr = (SYS_Linux + 228); | |
| 239 | pub const SYS_fgetxattr = (SYS_Linux + 229); | |
| 240 | pub const SYS_listxattr = (SYS_Linux + 230); | |
| 241 | pub const SYS_llistxattr = (SYS_Linux + 231); | |
| 242 | pub const SYS_flistxattr = (SYS_Linux + 232); | |
| 243 | pub const SYS_removexattr = (SYS_Linux + 233); | |
| 244 | pub const SYS_lremovexattr = (SYS_Linux + 234); | |
| 245 | pub const SYS_fremovexattr = (SYS_Linux + 235); | |
| 246 | pub const SYS_tkill = (SYS_Linux + 236); | |
| 247 | pub const SYS_sendfile64 = (SYS_Linux + 237); | |
| 248 | pub const SYS_futex = (SYS_Linux + 238); | |
| 249 | pub const SYS_sched_setaffinity = (SYS_Linux + 239); | |
| 250 | pub const SYS_sched_getaffinity = (SYS_Linux + 240); | |
| 251 | pub const SYS_io_setup = (SYS_Linux + 241); | |
| 252 | pub const SYS_io_destroy = (SYS_Linux + 242); | |
| 253 | pub const SYS_io_getevents = (SYS_Linux + 243); | |
| 254 | pub const SYS_io_submit = (SYS_Linux + 244); | |
| 255 | pub const SYS_io_cancel = (SYS_Linux + 245); | |
| 256 | pub const SYS_exit_group = (SYS_Linux + 246); | |
| 257 | pub const SYS_lookup_dcookie = (SYS_Linux + 247); | |
| 258 | pub const SYS_epoll_create = (SYS_Linux + 248); | |
| 259 | pub const SYS_epoll_ctl = (SYS_Linux + 249); | |
| 260 | pub const SYS_epoll_wait = (SYS_Linux + 250); | |
| 261 | pub const SYS_remap_file_pages = (SYS_Linux + 251); | |
| 262 | pub const SYS_set_tid_address = (SYS_Linux + 252); | |
| 263 | pub const SYS_restart_syscall = (SYS_Linux + 253); | |
| 264 | pub const SYS_fadvise64 = (SYS_Linux + 254); | |
| 265 | pub const SYS_statfs64 = (SYS_Linux + 255); | |
| 266 | pub const SYS_fstatfs64 = (SYS_Linux + 256); | |
| 267 | pub const SYS_timer_create = (SYS_Linux + 257); | |
| 268 | pub const SYS_timer_settime = (SYS_Linux + 258); | |
| 269 | pub const SYS_timer_gettime = (SYS_Linux + 259); | |
| 270 | pub const SYS_timer_getoverrun = (SYS_Linux + 260); | |
| 271 | pub const SYS_timer_delete = (SYS_Linux + 261); | |
| 272 | pub const SYS_clock_settime = (SYS_Linux + 262); | |
| 273 | pub const SYS_clock_gettime = (SYS_Linux + 263); | |
| 274 | pub const SYS_clock_getres = (SYS_Linux + 264); | |
| 275 | pub const SYS_clock_nanosleep = (SYS_Linux + 265); | |
| 276 | pub const SYS_tgkill = (SYS_Linux + 266); | |
| 277 | pub const SYS_utimes = (SYS_Linux + 267); | |
| 278 | pub const SYS_mbind = (SYS_Linux + 268); | |
| 279 | pub const SYS_get_mempolicy = (SYS_Linux + 269); | |
| 280 | pub const SYS_set_mempolicy = (SYS_Linux + 270); | |
| 281 | pub const SYS_mq_open = (SYS_Linux + 271); | |
| 282 | pub const SYS_mq_unlink = (SYS_Linux + 272); | |
| 283 | pub const SYS_mq_timedsend = (SYS_Linux + 273); | |
| 284 | pub const SYS_mq_timedreceive = (SYS_Linux + 274); | |
| 285 | pub const SYS_mq_notify = (SYS_Linux + 275); | |
| 286 | pub const SYS_mq_getsetattr = (SYS_Linux + 276); | |
| 287 | pub const SYS_vserver = (SYS_Linux + 277); | |
| 288 | pub const SYS_waitid = (SYS_Linux + 278); | |
| 289 | pub const SYS_add_key = (SYS_Linux + 280); | |
| 290 | pub const SYS_request_key = (SYS_Linux + 281); | |
| 291 | pub const SYS_keyctl = (SYS_Linux + 282); | |
| 292 | pub const SYS_set_thread_area = (SYS_Linux + 283); | |
| 293 | pub const SYS_inotify_init = (SYS_Linux + 284); | |
| 294 | pub const SYS_inotify_add_watch = (SYS_Linux + 285); | |
| 295 | pub const SYS_inotify_rm_watch = (SYS_Linux + 286); | |
| 296 | pub const SYS_migrate_pages = (SYS_Linux + 287); | |
| 297 | pub const SYS_openat = (SYS_Linux + 288); | |
| 298 | pub const SYS_mkdirat = (SYS_Linux + 289); | |
| 299 | pub const SYS_mknodat = (SYS_Linux + 290); | |
| 300 | pub const SYS_fchownat = (SYS_Linux + 291); | |
| 301 | pub const SYS_futimesat = (SYS_Linux + 292); | |
| 302 | pub const SYS_fstatat64 = (SYS_Linux + 293); | |
| 303 | pub const SYS_unlinkat = (SYS_Linux + 294); | |
| 304 | pub const SYS_renameat = (SYS_Linux + 295); | |
| 305 | pub const SYS_linkat = (SYS_Linux + 296); | |
| 306 | pub const SYS_symlinkat = (SYS_Linux + 297); | |
| 307 | pub const SYS_readlinkat = (SYS_Linux + 298); | |
| 308 | pub const SYS_fchmodat = (SYS_Linux + 299); | |
| 309 | pub const SYS_faccessat = (SYS_Linux + 300); | |
| 310 | pub const SYS_pselect6 = (SYS_Linux + 301); | |
| 311 | pub const SYS_ppoll = (SYS_Linux + 302); | |
| 312 | pub const SYS_unshare = (SYS_Linux + 303); | |
| 313 | pub const SYS_splice = (SYS_Linux + 304); | |
| 314 | pub const SYS_sync_file_range = (SYS_Linux + 305); | |
| 315 | pub const SYS_tee = (SYS_Linux + 306); | |
| 316 | pub const SYS_vmsplice = (SYS_Linux + 307); | |
| 317 | pub const SYS_move_pages = (SYS_Linux + 308); | |
| 318 | pub const SYS_set_robust_list = (SYS_Linux + 309); | |
| 319 | pub const SYS_get_robust_list = (SYS_Linux + 310); | |
| 320 | pub const SYS_kexec_load = (SYS_Linux + 311); | |
| 321 | pub const SYS_getcpu = (SYS_Linux + 312); | |
| 322 | pub const SYS_epoll_pwait = (SYS_Linux + 313); | |
| 323 | pub const SYS_ioprio_set = (SYS_Linux + 314); | |
| 324 | pub const SYS_ioprio_get = (SYS_Linux + 315); | |
| 325 | pub const SYS_utimensat = (SYS_Linux + 316); | |
| 326 | pub const SYS_signalfd = (SYS_Linux + 317); | |
| 327 | pub const SYS_timerfd = (SYS_Linux + 318); | |
| 328 | pub const SYS_eventfd = (SYS_Linux + 319); | |
| 329 | pub const SYS_fallocate = (SYS_Linux + 320); | |
| 330 | pub const SYS_timerfd_create = (SYS_Linux + 321); | |
| 331 | pub const SYS_timerfd_gettime = (SYS_Linux + 322); | |
| 332 | pub const SYS_timerfd_settime = (SYS_Linux + 323); | |
| 333 | pub const SYS_signalfd4 = (SYS_Linux + 324); | |
| 334 | pub const SYS_eventfd2 = (SYS_Linux + 325); | |
| 335 | pub const SYS_epoll_create1 = (SYS_Linux + 326); | |
| 336 | pub const SYS_dup3 = (SYS_Linux + 327); | |
| 337 | pub const SYS_pipe2 = (SYS_Linux + 328); | |
| 338 | pub const SYS_inotify_init1 = (SYS_Linux + 329); | |
| 339 | pub const SYS_preadv = (SYS_Linux + 330); | |
| 340 | pub const SYS_pwritev = (SYS_Linux + 331); | |
| 341 | pub const SYS_rt_tgsigqueueinfo = (SYS_Linux + 332); | |
| 342 | pub const SYS_perf_event_open = (SYS_Linux + 333); | |
| 343 | pub const SYS_accept4 = (SYS_Linux + 334); | |
| 344 | pub const SYS_recvmmsg = (SYS_Linux + 335); | |
| 345 | pub const SYS_fanotify_init = (SYS_Linux + 336); | |
| 346 | pub const SYS_fanotify_mark = (SYS_Linux + 337); | |
| 347 | pub const SYS_prlimit64 = (SYS_Linux + 338); | |
| 348 | pub const SYS_name_to_handle_at = (SYS_Linux + 339); | |
| 349 | pub const SYS_open_by_handle_at = (SYS_Linux + 340); | |
| 350 | pub const SYS_clock_adjtime = (SYS_Linux + 341); | |
| 351 | pub const SYS_syncfs = (SYS_Linux + 342); | |
| 352 | pub const SYS_sendmmsg = (SYS_Linux + 343); | |
| 353 | pub const SYS_setns = (SYS_Linux + 344); | |
| 354 | pub const SYS_process_vm_readv = (SYS_Linux + 345); | |
| 355 | pub const SYS_process_vm_writev = (SYS_Linux + 346); | |
| 356 | pub const SYS_kcmp = (SYS_Linux + 347); | |
| 357 | pub const SYS_finit_module = (SYS_Linux + 348); | |
| 358 | pub const SYS_sched_setattr = (SYS_Linux + 349); | |
| 359 | pub const SYS_sched_getattr = (SYS_Linux + 350); | |
| 360 | pub const SYS_renameat2 = (SYS_Linux + 351); | |
| 361 | pub const SYS_seccomp = (SYS_Linux + 352); | |
| 362 | pub const SYS_getrandom = (SYS_Linux + 353); | |
| 363 | pub const SYS_memfd_create = (SYS_Linux + 354); | |
| 364 | pub const SYS_bpf = (SYS_Linux + 355); | |
| 365 | pub const SYS_execveat = (SYS_Linux + 356); | |
| 366 | pub const SYS_userfaultfd = (SYS_Linux + 357); | |
| 367 | pub const SYS_membarrier = (SYS_Linux + 358); | |
| 368 | pub const SYS_mlock2 = (SYS_Linux + 359); | |
| 369 | pub const SYS_copy_file_range = (SYS_Linux + 360); | |
| 370 | pub const SYS_preadv2 = (SYS_Linux + 361); | |
| 371 | pub const SYS_pwritev2 = (SYS_Linux + 362); | |
| 372 | pub const SYS_pkey_mprotect = (SYS_Linux + 363); | |
| 373 | pub const SYS_pkey_alloc = (SYS_Linux + 364); | |
| 374 | pub const SYS_pkey_free = (SYS_Linux + 365); | |
| 375 | pub const SYS_statx = (SYS_Linux + 366); | |
| 376 | pub const SYS_rseq = (SYS_Linux + 367); | |
| 377 | pub const SYS_io_pgetevents = (SYS_Linux + 368); | |
| 378 | pub const SYS_openat2 = (SYS_Linux + 437); | |
| 379 | pub const SYS_pidfd_getfd = (SYS_Linux + 438); | |
| 9 | pub const SYS = extern enum(usize) { | |
| 10 | pub const Linux = 4000; | |
| 11 | ||
| 12 | syscall = Linux + 0, | |
| 13 | exit = Linux + 1, | |
| 14 | fork = Linux + 2, | |
| 15 | read = Linux + 3, | |
| 16 | write = Linux + 4, | |
| 17 | open = Linux + 5, | |
| 18 | close = Linux + 6, | |
| 19 | waitpid = Linux + 7, | |
| 20 | creat = Linux + 8, | |
| 21 | link = Linux + 9, | |
| 22 | unlink = Linux + 10, | |
| 23 | execve = Linux + 11, | |
| 24 | chdir = Linux + 12, | |
| 25 | time = Linux + 13, | |
| 26 | mknod = Linux + 14, | |
| 27 | chmod = Linux + 15, | |
| 28 | lchown = Linux + 16, | |
| 29 | @"break" = Linux + 17, | |
| 30 | unused18 = Linux + 18, | |
| 31 | lseek = Linux + 19, | |
| 32 | getpid = Linux + 20, | |
| 33 | mount = Linux + 21, | |
| 34 | umount = Linux + 22, | |
| 35 | setuid = Linux + 23, | |
| 36 | getuid = Linux + 24, | |
| 37 | stime = Linux + 25, | |
| 38 | ptrace = Linux + 26, | |
| 39 | alarm = Linux + 27, | |
| 40 | unused28 = Linux + 28, | |
| 41 | pause = Linux + 29, | |
| 42 | utime = Linux + 30, | |
| 43 | stty = Linux + 31, | |
| 44 | gtty = Linux + 32, | |
| 45 | access = Linux + 33, | |
| 46 | nice = Linux + 34, | |
| 47 | ftime = Linux + 35, | |
| 48 | sync = Linux + 36, | |
| 49 | kill = Linux + 37, | |
| 50 | rename = Linux + 38, | |
| 51 | mkdir = Linux + 39, | |
| 52 | rmdir = Linux + 40, | |
| 53 | dup = Linux + 41, | |
| 54 | pipe = Linux + 42, | |
| 55 | times = Linux + 43, | |
| 56 | prof = Linux + 44, | |
| 57 | brk = Linux + 45, | |
| 58 | setgid = Linux + 46, | |
| 59 | getgid = Linux + 47, | |
| 60 | signal = Linux + 48, | |
| 61 | geteuid = Linux + 49, | |
| 62 | getegid = Linux + 50, | |
| 63 | acct = Linux + 51, | |
| 64 | umount2 = Linux + 52, | |
| 65 | lock = Linux + 53, | |
| 66 | ioctl = Linux + 54, | |
| 67 | fcntl = Linux + 55, | |
| 68 | mpx = Linux + 56, | |
| 69 | setpgid = Linux + 57, | |
| 70 | ulimit = Linux + 58, | |
| 71 | unused59 = Linux + 59, | |
| 72 | umask = Linux + 60, | |
| 73 | chroot = Linux + 61, | |
| 74 | ustat = Linux + 62, | |
| 75 | dup2 = Linux + 63, | |
| 76 | getppid = Linux + 64, | |
| 77 | getpgrp = Linux + 65, | |
| 78 | setsid = Linux + 66, | |
| 79 | sigaction = Linux + 67, | |
| 80 | sgetmask = Linux + 68, | |
| 81 | ssetmask = Linux + 69, | |
| 82 | setreuid = Linux + 70, | |
| 83 | setregid = Linux + 71, | |
| 84 | sigsuspend = Linux + 72, | |
| 85 | sigpending = Linux + 73, | |
| 86 | sethostname = Linux + 74, | |
| 87 | setrlimit = Linux + 75, | |
| 88 | getrlimit = Linux + 76, | |
| 89 | getrusage = Linux + 77, | |
| 90 | gettimeofday = Linux + 78, | |
| 91 | settimeofday = Linux + 79, | |
| 92 | getgroups = Linux + 80, | |
| 93 | setgroups = Linux + 81, | |
| 94 | reserved82 = Linux + 82, | |
| 95 | symlink = Linux + 83, | |
| 96 | unused84 = Linux + 84, | |
| 97 | readlink = Linux + 85, | |
| 98 | uselib = Linux + 86, | |
| 99 | swapon = Linux + 87, | |
| 100 | reboot = Linux + 88, | |
| 101 | readdir = Linux + 89, | |
| 102 | mmap = Linux + 90, | |
| 103 | munmap = Linux + 91, | |
| 104 | truncate = Linux + 92, | |
| 105 | ftruncate = Linux + 93, | |
| 106 | fchmod = Linux + 94, | |
| 107 | fchown = Linux + 95, | |
| 108 | getpriority = Linux + 96, | |
| 109 | setpriority = Linux + 97, | |
| 110 | profil = Linux + 98, | |
| 111 | statfs = Linux + 99, | |
| 112 | fstatfs = Linux + 100, | |
| 113 | ioperm = Linux + 101, | |
| 114 | socketcall = Linux + 102, | |
| 115 | syslog = Linux + 103, | |
| 116 | setitimer = Linux + 104, | |
| 117 | getitimer = Linux + 105, | |
| 118 | stat = Linux + 106, | |
| 119 | lstat = Linux + 107, | |
| 120 | fstat = Linux + 108, | |
| 121 | unused109 = Linux + 109, | |
| 122 | iopl = Linux + 110, | |
| 123 | vhangup = Linux + 111, | |
| 124 | idle = Linux + 112, | |
| 125 | vm86 = Linux + 113, | |
| 126 | wait4 = Linux + 114, | |
| 127 | swapoff = Linux + 115, | |
| 128 | sysinfo = Linux + 116, | |
| 129 | ipc = Linux + 117, | |
| 130 | fsync = Linux + 118, | |
| 131 | sigreturn = Linux + 119, | |
| 132 | clone = Linux + 120, | |
| 133 | setdomainname = Linux + 121, | |
| 134 | uname = Linux + 122, | |
| 135 | modify_ldt = Linux + 123, | |
| 136 | adjtimex = Linux + 124, | |
| 137 | mprotect = Linux + 125, | |
| 138 | sigprocmask = Linux + 126, | |
| 139 | create_module = Linux + 127, | |
| 140 | init_module = Linux + 128, | |
| 141 | delete_module = Linux + 129, | |
| 142 | get_kernel_syms = Linux + 130, | |
| 143 | quotactl = Linux + 131, | |
| 144 | getpgid = Linux + 132, | |
| 145 | fchdir = Linux + 133, | |
| 146 | bdflush = Linux + 134, | |
| 147 | sysfs = Linux + 135, | |
| 148 | personality = Linux + 136, | |
| 149 | afs_syscall = Linux + 137, | |
| 150 | setfsuid = Linux + 138, | |
| 151 | setfsgid = Linux + 139, | |
| 152 | _llseek = Linux + 140, | |
| 153 | getdents = Linux + 141, | |
| 154 | _newselect = Linux + 142, | |
| 155 | flock = Linux + 143, | |
| 156 | msync = Linux + 144, | |
| 157 | readv = Linux + 145, | |
| 158 | writev = Linux + 146, | |
| 159 | cacheflush = Linux + 147, | |
| 160 | cachectl = Linux + 148, | |
| 161 | sysmips = Linux + 149, | |
| 162 | unused150 = Linux + 150, | |
| 163 | getsid = Linux + 151, | |
| 164 | fdatasync = Linux + 152, | |
| 165 | _sysctl = Linux + 153, | |
| 166 | mlock = Linux + 154, | |
| 167 | munlock = Linux + 155, | |
| 168 | mlockall = Linux + 156, | |
| 169 | munlockall = Linux + 157, | |
| 170 | sched_setparam = Linux + 158, | |
| 171 | sched_getparam = Linux + 159, | |
| 172 | sched_setscheduler = Linux + 160, | |
| 173 | sched_getscheduler = Linux + 161, | |
| 174 | sched_yield = Linux + 162, | |
| 175 | sched_get_priority_max = Linux + 163, | |
| 176 | sched_get_priority_min = Linux + 164, | |
| 177 | sched_rr_get_interval = Linux + 165, | |
| 178 | nanosleep = Linux + 166, | |
| 179 | mremap = Linux + 167, | |
| 180 | accept = Linux + 168, | |
| 181 | bind = Linux + 169, | |
| 182 | connect = Linux + 170, | |
| 183 | getpeername = Linux + 171, | |
| 184 | getsockname = Linux + 172, | |
| 185 | getsockopt = Linux + 173, | |
| 186 | listen = Linux + 174, | |
| 187 | recv = Linux + 175, | |
| 188 | recvfrom = Linux + 176, | |
| 189 | recvmsg = Linux + 177, | |
| 190 | send = Linux + 178, | |
| 191 | sendmsg = Linux + 179, | |
| 192 | sendto = Linux + 180, | |
| 193 | setsockopt = Linux + 181, | |
| 194 | shutdown = Linux + 182, | |
| 195 | socket = Linux + 183, | |
| 196 | socketpair = Linux + 184, | |
| 197 | setresuid = Linux + 185, | |
| 198 | getresuid = Linux + 186, | |
| 199 | query_module = Linux + 187, | |
| 200 | poll = Linux + 188, | |
| 201 | nfsservctl = Linux + 189, | |
| 202 | setresgid = Linux + 190, | |
| 203 | getresgid = Linux + 191, | |
| 204 | prctl = Linux + 192, | |
| 205 | rt_sigreturn = Linux + 193, | |
| 206 | rt_sigaction = Linux + 194, | |
| 207 | rt_sigprocmask = Linux + 195, | |
| 208 | rt_sigpending = Linux + 196, | |
| 209 | rt_sigtimedwait = Linux + 197, | |
| 210 | rt_sigqueueinfo = Linux + 198, | |
| 211 | rt_sigsuspend = Linux + 199, | |
| 212 | pread64 = Linux + 200, | |
| 213 | pwrite64 = Linux + 201, | |
| 214 | chown = Linux + 202, | |
| 215 | getcwd = Linux + 203, | |
| 216 | capget = Linux + 204, | |
| 217 | capset = Linux + 205, | |
| 218 | sigaltstack = Linux + 206, | |
| 219 | sendfile = Linux + 207, | |
| 220 | getpmsg = Linux + 208, | |
| 221 | putpmsg = Linux + 209, | |
| 222 | mmap2 = Linux + 210, | |
| 223 | truncate64 = Linux + 211, | |
| 224 | ftruncate64 = Linux + 212, | |
| 225 | stat64 = Linux + 213, | |
| 226 | lstat64 = Linux + 214, | |
| 227 | fstat64 = Linux + 215, | |
| 228 | pivot_root = Linux + 216, | |
| 229 | mincore = Linux + 217, | |
| 230 | madvise = Linux + 218, | |
| 231 | getdents64 = Linux + 219, | |
| 232 | fcntl64 = Linux + 220, | |
| 233 | reserved221 = Linux + 221, | |
| 234 | gettid = Linux + 222, | |
| 235 | readahead = Linux + 223, | |
| 236 | setxattr = Linux + 224, | |
| 237 | lsetxattr = Linux + 225, | |
| 238 | fsetxattr = Linux + 226, | |
| 239 | getxattr = Linux + 227, | |
| 240 | lgetxattr = Linux + 228, | |
| 241 | fgetxattr = Linux + 229, | |
| 242 | listxattr = Linux + 230, | |
| 243 | llistxattr = Linux + 231, | |
| 244 | flistxattr = Linux + 232, | |
| 245 | removexattr = Linux + 233, | |
| 246 | lremovexattr = Linux + 234, | |
| 247 | fremovexattr = Linux + 235, | |
| 248 | tkill = Linux + 236, | |
| 249 | sendfile64 = Linux + 237, | |
| 250 | futex = Linux + 238, | |
| 251 | sched_setaffinity = Linux + 239, | |
| 252 | sched_getaffinity = Linux + 240, | |
| 253 | io_setup = Linux + 241, | |
| 254 | io_destroy = Linux + 242, | |
| 255 | io_getevents = Linux + 243, | |
| 256 | io_submit = Linux + 244, | |
| 257 | io_cancel = Linux + 245, | |
| 258 | exit_group = Linux + 246, | |
| 259 | lookup_dcookie = Linux + 247, | |
| 260 | epoll_create = Linux + 248, | |
| 261 | epoll_ctl = Linux + 249, | |
| 262 | epoll_wait = Linux + 250, | |
| 263 | remap_file_pages = Linux + 251, | |
| 264 | set_tid_address = Linux + 252, | |
| 265 | restart_syscall = Linux + 253, | |
| 266 | fadvise64 = Linux + 254, | |
| 267 | statfs64 = Linux + 255, | |
| 268 | fstatfs64 = Linux + 256, | |
| 269 | timer_create = Linux + 257, | |
| 270 | timer_settime = Linux + 258, | |
| 271 | timer_gettime = Linux + 259, | |
| 272 | timer_getoverrun = Linux + 260, | |
| 273 | timer_delete = Linux + 261, | |
| 274 | clock_settime = Linux + 262, | |
| 275 | clock_gettime = Linux + 263, | |
| 276 | clock_getres = Linux + 264, | |
| 277 | clock_nanosleep = Linux + 265, | |
| 278 | tgkill = Linux + 266, | |
| 279 | utimes = Linux + 267, | |
| 280 | mbind = Linux + 268, | |
| 281 | get_mempolicy = Linux + 269, | |
| 282 | set_mempolicy = Linux + 270, | |
| 283 | mq_open = Linux + 271, | |
| 284 | mq_unlink = Linux + 272, | |
| 285 | mq_timedsend = Linux + 273, | |
| 286 | mq_timedreceive = Linux + 274, | |
| 287 | mq_notify = Linux + 275, | |
| 288 | mq_getsetattr = Linux + 276, | |
| 289 | vserver = Linux + 277, | |
| 290 | waitid = Linux + 278, | |
| 291 | add_key = Linux + 280, | |
| 292 | request_key = Linux + 281, | |
| 293 | keyctl = Linux + 282, | |
| 294 | set_thread_area = Linux + 283, | |
| 295 | inotify_init = Linux + 284, | |
| 296 | inotify_add_watch = Linux + 285, | |
| 297 | inotify_rm_watch = Linux + 286, | |
| 298 | migrate_pages = Linux + 287, | |
| 299 | openat = Linux + 288, | |
| 300 | mkdirat = Linux + 289, | |
| 301 | mknodat = Linux + 290, | |
| 302 | fchownat = Linux + 291, | |
| 303 | futimesat = Linux + 292, | |
| 304 | fstatat64 = Linux + 293, | |
| 305 | unlinkat = Linux + 294, | |
| 306 | renameat = Linux + 295, | |
| 307 | linkat = Linux + 296, | |
| 308 | symlinkat = Linux + 297, | |
| 309 | readlinkat = Linux + 298, | |
| 310 | fchmodat = Linux + 299, | |
| 311 | faccessat = Linux + 300, | |
| 312 | pselect6 = Linux + 301, | |
| 313 | ppoll = Linux + 302, | |
| 314 | unshare = Linux + 303, | |
| 315 | splice = Linux + 304, | |
| 316 | sync_file_range = Linux + 305, | |
| 317 | tee = Linux + 306, | |
| 318 | vmsplice = Linux + 307, | |
| 319 | move_pages = Linux + 308, | |
| 320 | set_robust_list = Linux + 309, | |
| 321 | get_robust_list = Linux + 310, | |
| 322 | kexec_load = Linux + 311, | |
| 323 | getcpu = Linux + 312, | |
| 324 | epoll_pwait = Linux + 313, | |
| 325 | ioprio_set = Linux + 314, | |
| 326 | ioprio_get = Linux + 315, | |
| 327 | utimensat = Linux + 316, | |
| 328 | signalfd = Linux + 317, | |
| 329 | timerfd = Linux + 318, | |
| 330 | eventfd = Linux + 319, | |
| 331 | fallocate = Linux + 320, | |
| 332 | timerfd_create = Linux + 321, | |
| 333 | timerfd_gettime = Linux + 322, | |
| 334 | timerfd_settime = Linux + 323, | |
| 335 | signalfd4 = Linux + 324, | |
| 336 | eventfd2 = Linux + 325, | |
| 337 | epoll_create1 = Linux + 326, | |
| 338 | dup3 = Linux + 327, | |
| 339 | pipe2 = Linux + 328, | |
| 340 | inotify_init1 = Linux + 329, | |
| 341 | preadv = Linux + 330, | |
| 342 | pwritev = Linux + 331, | |
| 343 | rt_tgsigqueueinfo = Linux + 332, | |
| 344 | perf_event_open = Linux + 333, | |
| 345 | accept4 = Linux + 334, | |
| 346 | recvmmsg = Linux + 335, | |
| 347 | fanotify_init = Linux + 336, | |
| 348 | fanotify_mark = Linux + 337, | |
| 349 | prlimit64 = Linux + 338, | |
| 350 | name_to_handle_at = Linux + 339, | |
| 351 | open_by_handle_at = Linux + 340, | |
| 352 | clock_adjtime = Linux + 341, | |
| 353 | syncfs = Linux + 342, | |
| 354 | sendmmsg = Linux + 343, | |
| 355 | setns = Linux + 344, | |
| 356 | process_vm_readv = Linux + 345, | |
| 357 | process_vm_writev = Linux + 346, | |
| 358 | kcmp = Linux + 347, | |
| 359 | finit_module = Linux + 348, | |
| 360 | sched_setattr = Linux + 349, | |
| 361 | sched_getattr = Linux + 350, | |
| 362 | renameat2 = Linux + 351, | |
| 363 | seccomp = Linux + 352, | |
| 364 | getrandom = Linux + 353, | |
| 365 | memfd_create = Linux + 354, | |
| 366 | bpf = Linux + 355, | |
| 367 | execveat = Linux + 356, | |
| 368 | userfaultfd = Linux + 357, | |
| 369 | membarrier = Linux + 358, | |
| 370 | mlock2 = Linux + 359, | |
| 371 | copy_file_range = Linux + 360, | |
| 372 | preadv2 = Linux + 361, | |
| 373 | pwritev2 = Linux + 362, | |
| 374 | pkey_mprotect = Linux + 363, | |
| 375 | pkey_alloc = Linux + 364, | |
| 376 | pkey_free = Linux + 365, | |
| 377 | statx = Linux + 366, | |
| 378 | rseq = Linux + 367, | |
| 379 | io_pgetevents = Linux + 368, | |
| 380 | openat2 = Linux + 437, | |
| 381 | pidfd_getfd = Linux + 438, | |
| 382 | ||
| 383 | _, | |
| 384 | }; | |
| 380 | 385 | |
| 381 | 386 | pub const O_CREAT = 0o0400; |
| 382 | 387 | pub const O_EXCL = 0o02000; |
lib/std/os/bits/linux/riscv64.zig+298-294| ... | ... | @@ -3,302 +3,306 @@ const std = @import("../../../std.zig"); |
| 3 | 3 | const uid_t = std.os.linux.uid_t; |
| 4 | 4 | const gid_t = std.os.linux.gid_t; |
| 5 | 5 | |
| 6 | pub const SYS_io_setup = 0; | |
| 7 | pub const SYS_io_destroy = 1; | |
| 8 | pub const SYS_io_submit = 2; | |
| 9 | pub const SYS_io_cancel = 3; | |
| 10 | pub const SYS_io_getevents = 4; | |
| 11 | pub const SYS_setxattr = 5; | |
| 12 | pub const SYS_lsetxattr = 6; | |
| 13 | pub const SYS_fsetxattr = 7; | |
| 14 | pub const SYS_getxattr = 8; | |
| 15 | pub const SYS_lgetxattr = 9; | |
| 16 | pub const SYS_fgetxattr = 10; | |
| 17 | pub const SYS_listxattr = 11; | |
| 18 | pub const SYS_llistxattr = 12; | |
| 19 | pub const SYS_flistxattr = 13; | |
| 20 | pub const SYS_removexattr = 14; | |
| 21 | pub const SYS_lremovexattr = 15; | |
| 22 | pub const SYS_fremovexattr = 16; | |
| 23 | pub const SYS_getcwd = 17; | |
| 24 | pub const SYS_lookup_dcookie = 18; | |
| 25 | pub const SYS_eventfd2 = 19; | |
| 26 | pub const SYS_epoll_create1 = 20; | |
| 27 | pub const SYS_epoll_ctl = 21; | |
| 28 | pub const SYS_epoll_pwait = 22; | |
| 29 | pub const SYS_dup = 23; | |
| 30 | pub const SYS_dup3 = 24; | |
| 31 | pub const SYS_fcntl = 25; | |
| 32 | pub const SYS_inotify_init1 = 26; | |
| 33 | pub const SYS_inotify_add_watch = 27; | |
| 34 | pub const SYS_inotify_rm_watch = 28; | |
| 35 | pub const SYS_ioctl = 29; | |
| 36 | pub const SYS_ioprio_set = 30; | |
| 37 | pub const SYS_ioprio_get = 31; | |
| 38 | pub const SYS_flock = 32; | |
| 39 | pub const SYS_mknodat = 33; | |
| 40 | pub const SYS_mkdirat = 34; | |
| 41 | pub const SYS_unlinkat = 35; | |
| 42 | pub const SYS_symlinkat = 36; | |
| 43 | pub const SYS_linkat = 37; | |
| 44 | pub const SYS_umount2 = 39; | |
| 45 | pub const SYS_mount = 40; | |
| 46 | pub const SYS_pivot_root = 41; | |
| 47 | pub const SYS_nfsservctl = 42; | |
| 48 | pub const SYS_statfs = 43; | |
| 49 | pub const SYS_fstatfs = 44; | |
| 50 | pub const SYS_truncate = 45; | |
| 51 | pub const SYS_ftruncate = 46; | |
| 52 | pub const SYS_fallocate = 47; | |
| 53 | pub const SYS_faccessat = 48; | |
| 54 | pub const SYS_chdir = 49; | |
| 55 | pub const SYS_fchdir = 50; | |
| 56 | pub const SYS_chroot = 51; | |
| 57 | pub const SYS_fchmod = 52; | |
| 58 | pub const SYS_fchmodat = 53; | |
| 59 | pub const SYS_fchownat = 54; | |
| 60 | pub const SYS_fchown = 55; | |
| 61 | pub const SYS_openat = 56; | |
| 62 | pub const SYS_close = 57; | |
| 63 | pub const SYS_vhangup = 58; | |
| 64 | pub const SYS_pipe2 = 59; | |
| 65 | pub const SYS_quotactl = 60; | |
| 66 | pub const SYS_getdents64 = 61; | |
| 67 | pub const SYS_lseek = 62; | |
| 68 | pub const SYS_read = 63; | |
| 69 | pub const SYS_write = 64; | |
| 70 | pub const SYS_readv = 65; | |
| 71 | pub const SYS_writev = 66; | |
| 72 | pub const SYS_pread64 = 67; | |
| 73 | pub const SYS_pwrite64 = 68; | |
| 74 | pub const SYS_preadv = 69; | |
| 75 | pub const SYS_pwritev = 70; | |
| 76 | pub const SYS_sendfile = 71; | |
| 77 | pub const SYS_pselect6 = 72; | |
| 78 | pub const SYS_ppoll = 73; | |
| 79 | pub const SYS_signalfd4 = 74; | |
| 80 | pub const SYS_vmsplice = 75; | |
| 81 | pub const SYS_splice = 76; | |
| 82 | pub const SYS_tee = 77; | |
| 83 | pub const SYS_readlinkat = 78; | |
| 84 | pub const SYS_fstatat = 79; | |
| 85 | pub const SYS_fstat = 80; | |
| 86 | pub const SYS_sync = 81; | |
| 87 | pub const SYS_fsync = 82; | |
| 88 | pub const SYS_fdatasync = 83; | |
| 89 | pub const SYS_sync_file_range = 84; | |
| 90 | pub const SYS_timerfd_create = 85; | |
| 91 | pub const SYS_timerfd_settime = 86; | |
| 92 | pub const SYS_timerfd_gettime = 87; | |
| 93 | pub const SYS_utimensat = 88; | |
| 94 | pub const SYS_acct = 89; | |
| 95 | pub const SYS_capget = 90; | |
| 96 | pub const SYS_capset = 91; | |
| 97 | pub const SYS_personality = 92; | |
| 98 | pub const SYS_exit = 93; | |
| 99 | pub const SYS_exit_group = 94; | |
| 100 | pub const SYS_waitid = 95; | |
| 101 | pub const SYS_set_tid_address = 96; | |
| 102 | pub const SYS_unshare = 97; | |
| 103 | pub const SYS_futex = 98; | |
| 104 | pub const SYS_set_robust_list = 99; | |
| 105 | pub const SYS_get_robust_list = 100; | |
| 106 | pub const SYS_nanosleep = 101; | |
| 107 | pub const SYS_getitimer = 102; | |
| 108 | pub const SYS_setitimer = 103; | |
| 109 | pub const SYS_kexec_load = 104; | |
| 110 | pub const SYS_init_module = 105; | |
| 111 | pub const SYS_delete_module = 106; | |
| 112 | pub const SYS_timer_create = 107; | |
| 113 | pub const SYS_timer_gettime = 108; | |
| 114 | pub const SYS_timer_getoverrun = 109; | |
| 115 | pub const SYS_timer_settime = 110; | |
| 116 | pub const SYS_timer_delete = 111; | |
| 117 | pub const SYS_clock_settime = 112; | |
| 118 | pub const SYS_clock_gettime = 113; | |
| 119 | pub const SYS_clock_getres = 114; | |
| 120 | pub const SYS_clock_nanosleep = 115; | |
| 121 | pub const SYS_syslog = 116; | |
| 122 | pub const SYS_ptrace = 117; | |
| 123 | pub const SYS_sched_setparam = 118; | |
| 124 | pub const SYS_sched_setscheduler = 119; | |
| 125 | pub const SYS_sched_getscheduler = 120; | |
| 126 | pub const SYS_sched_getparam = 121; | |
| 127 | pub const SYS_sched_setaffinity = 122; | |
| 128 | pub const SYS_sched_getaffinity = 123; | |
| 129 | pub const SYS_sched_yield = 124; | |
| 130 | pub const SYS_sched_get_priority_max = 125; | |
| 131 | pub const SYS_sched_get_priority_min = 126; | |
| 132 | pub const SYS_sched_rr_get_interval = 127; | |
| 133 | pub const SYS_restart_syscall = 128; | |
| 134 | pub const SYS_kill = 129; | |
| 135 | pub const SYS_tkill = 130; | |
| 136 | pub const SYS_tgkill = 131; | |
| 137 | pub const SYS_sigaltstack = 132; | |
| 138 | pub const SYS_rt_sigsuspend = 133; | |
| 139 | pub const SYS_rt_sigaction = 134; | |
| 140 | pub const SYS_rt_sigprocmask = 135; | |
| 141 | pub const SYS_rt_sigpending = 136; | |
| 142 | pub const SYS_rt_sigtimedwait = 137; | |
| 143 | pub const SYS_rt_sigqueueinfo = 138; | |
| 144 | pub const SYS_rt_sigreturn = 139; | |
| 145 | pub const SYS_setpriority = 140; | |
| 146 | pub const SYS_getpriority = 141; | |
| 147 | pub const SYS_reboot = 142; | |
| 148 | pub const SYS_setregid = 143; | |
| 149 | pub const SYS_setgid = 144; | |
| 150 | pub const SYS_setreuid = 145; | |
| 151 | pub const SYS_setuid = 146; | |
| 152 | pub const SYS_setresuid = 147; | |
| 153 | pub const SYS_getresuid = 148; | |
| 154 | pub const SYS_setresgid = 149; | |
| 155 | pub const SYS_getresgid = 150; | |
| 156 | pub const SYS_setfsuid = 151; | |
| 157 | pub const SYS_setfsgid = 152; | |
| 158 | pub const SYS_times = 153; | |
| 159 | pub const SYS_setpgid = 154; | |
| 160 | pub const SYS_getpgid = 155; | |
| 161 | pub const SYS_getsid = 156; | |
| 162 | pub const SYS_setsid = 157; | |
| 163 | pub const SYS_getgroups = 158; | |
| 164 | pub const SYS_setgroups = 159; | |
| 165 | pub const SYS_uname = 160; | |
| 166 | pub const SYS_sethostname = 161; | |
| 167 | pub const SYS_setdomainname = 162; | |
| 168 | pub const SYS_getrlimit = 163; | |
| 169 | pub const SYS_setrlimit = 164; | |
| 170 | pub const SYS_getrusage = 165; | |
| 171 | pub const SYS_umask = 166; | |
| 172 | pub const SYS_prctl = 167; | |
| 173 | pub const SYS_getcpu = 168; | |
| 174 | pub const SYS_gettimeofday = 169; | |
| 175 | pub const SYS_settimeofday = 170; | |
| 176 | pub const SYS_adjtimex = 171; | |
| 177 | pub const SYS_getpid = 172; | |
| 178 | pub const SYS_getppid = 173; | |
| 179 | pub const SYS_getuid = 174; | |
| 180 | pub const SYS_geteuid = 175; | |
| 181 | pub const SYS_getgid = 176; | |
| 182 | pub const SYS_getegid = 177; | |
| 183 | pub const SYS_gettid = 178; | |
| 184 | pub const SYS_sysinfo = 179; | |
| 185 | pub const SYS_mq_open = 180; | |
| 186 | pub const SYS_mq_unlink = 181; | |
| 187 | pub const SYS_mq_timedsend = 182; | |
| 188 | pub const SYS_mq_timedreceive = 183; | |
| 189 | pub const SYS_mq_notify = 184; | |
| 190 | pub const SYS_mq_getsetattr = 185; | |
| 191 | pub const SYS_msgget = 186; | |
| 192 | pub const SYS_msgctl = 187; | |
| 193 | pub const SYS_msgrcv = 188; | |
| 194 | pub const SYS_msgsnd = 189; | |
| 195 | pub const SYS_semget = 190; | |
| 196 | pub const SYS_semctl = 191; | |
| 197 | pub const SYS_semtimedop = 192; | |
| 198 | pub const SYS_semop = 193; | |
| 199 | pub const SYS_shmget = 194; | |
| 200 | pub const SYS_shmctl = 195; | |
| 201 | pub const SYS_shmat = 196; | |
| 202 | pub const SYS_shmdt = 197; | |
| 203 | pub const SYS_socket = 198; | |
| 204 | pub const SYS_socketpair = 199; | |
| 205 | pub const SYS_bind = 200; | |
| 206 | pub const SYS_listen = 201; | |
| 207 | pub const SYS_accept = 202; | |
| 208 | pub const SYS_connect = 203; | |
| 209 | pub const SYS_getsockname = 204; | |
| 210 | pub const SYS_getpeername = 205; | |
| 211 | pub const SYS_sendto = 206; | |
| 212 | pub const SYS_recvfrom = 207; | |
| 213 | pub const SYS_setsockopt = 208; | |
| 214 | pub const SYS_getsockopt = 209; | |
| 215 | pub const SYS_shutdown = 210; | |
| 216 | pub const SYS_sendmsg = 211; | |
| 217 | pub const SYS_recvmsg = 212; | |
| 218 | pub const SYS_readahead = 213; | |
| 219 | pub const SYS_brk = 214; | |
| 220 | pub const SYS_munmap = 215; | |
| 221 | pub const SYS_mremap = 216; | |
| 222 | pub const SYS_add_key = 217; | |
| 223 | pub const SYS_request_key = 218; | |
| 224 | pub const SYS_keyctl = 219; | |
| 225 | pub const SYS_clone = 220; | |
| 226 | pub const SYS_execve = 221; | |
| 227 | pub const SYS_mmap = 222; | |
| 228 | pub const SYS_fadvise64 = 223; | |
| 229 | pub const SYS_swapon = 224; | |
| 230 | pub const SYS_swapoff = 225; | |
| 231 | pub const SYS_mprotect = 226; | |
| 232 | pub const SYS_msync = 227; | |
| 233 | pub const SYS_mlock = 228; | |
| 234 | pub const SYS_munlock = 229; | |
| 235 | pub const SYS_mlockall = 230; | |
| 236 | pub const SYS_munlockall = 231; | |
| 237 | pub const SYS_mincore = 232; | |
| 238 | pub const SYS_madvise = 233; | |
| 239 | pub const SYS_remap_file_pages = 234; | |
| 240 | pub const SYS_mbind = 235; | |
| 241 | pub const SYS_get_mempolicy = 236; | |
| 242 | pub const SYS_set_mempolicy = 237; | |
| 243 | pub const SYS_migrate_pages = 238; | |
| 244 | pub const SYS_move_pages = 239; | |
| 245 | pub const SYS_rt_tgsigqueueinfo = 240; | |
| 246 | pub const SYS_perf_event_open = 241; | |
| 247 | pub const SYS_accept4 = 242; | |
| 248 | pub const SYS_recvmmsg = 243; | |
| 6 | pub const SYS = extern enum(usize) { | |
| 7 | io_setup = 0, | |
| 8 | io_destroy = 1, | |
| 9 | io_submit = 2, | |
| 10 | io_cancel = 3, | |
| 11 | io_getevents = 4, | |
| 12 | setxattr = 5, | |
| 13 | lsetxattr = 6, | |
| 14 | fsetxattr = 7, | |
| 15 | getxattr = 8, | |
| 16 | lgetxattr = 9, | |
| 17 | fgetxattr = 10, | |
| 18 | listxattr = 11, | |
| 19 | llistxattr = 12, | |
| 20 | flistxattr = 13, | |
| 21 | removexattr = 14, | |
| 22 | lremovexattr = 15, | |
| 23 | fremovexattr = 16, | |
| 24 | getcwd = 17, | |
| 25 | lookup_dcookie = 18, | |
| 26 | eventfd2 = 19, | |
| 27 | epoll_create1 = 20, | |
| 28 | epoll_ctl = 21, | |
| 29 | epoll_pwait = 22, | |
| 30 | dup = 23, | |
| 31 | dup3 = 24, | |
| 32 | fcntl = 25, | |
| 33 | inotify_init1 = 26, | |
| 34 | inotify_add_watch = 27, | |
| 35 | inotify_rm_watch = 28, | |
| 36 | ioctl = 29, | |
| 37 | ioprio_set = 30, | |
| 38 | ioprio_get = 31, | |
| 39 | flock = 32, | |
| 40 | mknodat = 33, | |
| 41 | mkdirat = 34, | |
| 42 | unlinkat = 35, | |
| 43 | symlinkat = 36, | |
| 44 | linkat = 37, | |
| 45 | umount2 = 39, | |
| 46 | mount = 40, | |
| 47 | pivot_root = 41, | |
| 48 | nfsservctl = 42, | |
| 49 | statfs = 43, | |
| 50 | fstatfs = 44, | |
| 51 | truncate = 45, | |
| 52 | ftruncate = 46, | |
| 53 | fallocate = 47, | |
| 54 | faccessat = 48, | |
| 55 | chdir = 49, | |
| 56 | fchdir = 50, | |
| 57 | chroot = 51, | |
| 58 | fchmod = 52, | |
| 59 | fchmodat = 53, | |
| 60 | fchownat = 54, | |
| 61 | fchown = 55, | |
| 62 | openat = 56, | |
| 63 | close = 57, | |
| 64 | vhangup = 58, | |
| 65 | pipe2 = 59, | |
| 66 | quotactl = 60, | |
| 67 | getdents64 = 61, | |
| 68 | lseek = 62, | |
| 69 | read = 63, | |
| 70 | write = 64, | |
| 71 | readv = 65, | |
| 72 | writev = 66, | |
| 73 | pread64 = 67, | |
| 74 | pwrite64 = 68, | |
| 75 | preadv = 69, | |
| 76 | pwritev = 70, | |
| 77 | sendfile = 71, | |
| 78 | pselect6 = 72, | |
| 79 | ppoll = 73, | |
| 80 | signalfd4 = 74, | |
| 81 | vmsplice = 75, | |
| 82 | splice = 76, | |
| 83 | tee = 77, | |
| 84 | readlinkat = 78, | |
| 85 | fstatat = 79, | |
| 86 | fstat = 80, | |
| 87 | sync = 81, | |
| 88 | fsync = 82, | |
| 89 | fdatasync = 83, | |
| 90 | sync_file_range = 84, | |
| 91 | timerfd_create = 85, | |
| 92 | timerfd_settime = 86, | |
| 93 | timerfd_gettime = 87, | |
| 94 | utimensat = 88, | |
| 95 | acct = 89, | |
| 96 | capget = 90, | |
| 97 | capset = 91, | |
| 98 | personality = 92, | |
| 99 | exit = 93, | |
| 100 | exit_group = 94, | |
| 101 | waitid = 95, | |
| 102 | set_tid_address = 96, | |
| 103 | unshare = 97, | |
| 104 | futex = 98, | |
| 105 | set_robust_list = 99, | |
| 106 | get_robust_list = 100, | |
| 107 | nanosleep = 101, | |
| 108 | getitimer = 102, | |
| 109 | setitimer = 103, | |
| 110 | kexec_load = 104, | |
| 111 | init_module = 105, | |
| 112 | delete_module = 106, | |
| 113 | timer_create = 107, | |
| 114 | timer_gettime = 108, | |
| 115 | timer_getoverrun = 109, | |
| 116 | timer_settime = 110, | |
| 117 | timer_delete = 111, | |
| 118 | clock_settime = 112, | |
| 119 | clock_gettime = 113, | |
| 120 | clock_getres = 114, | |
| 121 | clock_nanosleep = 115, | |
| 122 | syslog = 116, | |
| 123 | ptrace = 117, | |
| 124 | sched_setparam = 118, | |
| 125 | sched_setscheduler = 119, | |
| 126 | sched_getscheduler = 120, | |
| 127 | sched_getparam = 121, | |
| 128 | sched_setaffinity = 122, | |
| 129 | sched_getaffinity = 123, | |
| 130 | sched_yield = 124, | |
| 131 | sched_get_priority_max = 125, | |
| 132 | sched_get_priority_min = 126, | |
| 133 | sched_rr_get_interval = 127, | |
| 134 | restart_syscall = 128, | |
| 135 | kill = 129, | |
| 136 | tkill = 130, | |
| 137 | tgkill = 131, | |
| 138 | sigaltstack = 132, | |
| 139 | rt_sigsuspend = 133, | |
| 140 | rt_sigaction = 134, | |
| 141 | rt_sigprocmask = 135, | |
| 142 | rt_sigpending = 136, | |
| 143 | rt_sigtimedwait = 137, | |
| 144 | rt_sigqueueinfo = 138, | |
| 145 | rt_sigreturn = 139, | |
| 146 | setpriority = 140, | |
| 147 | getpriority = 141, | |
| 148 | reboot = 142, | |
| 149 | setregid = 143, | |
| 150 | setgid = 144, | |
| 151 | setreuid = 145, | |
| 152 | setuid = 146, | |
| 153 | setresuid = 147, | |
| 154 | getresuid = 148, | |
| 155 | setresgid = 149, | |
| 156 | getresgid = 150, | |
| 157 | setfsuid = 151, | |
| 158 | setfsgid = 152, | |
| 159 | times = 153, | |
| 160 | setpgid = 154, | |
| 161 | getpgid = 155, | |
| 162 | getsid = 156, | |
| 163 | setsid = 157, | |
| 164 | getgroups = 158, | |
| 165 | setgroups = 159, | |
| 166 | uname = 160, | |
| 167 | sethostname = 161, | |
| 168 | setdomainname = 162, | |
| 169 | getrlimit = 163, | |
| 170 | setrlimit = 164, | |
| 171 | getrusage = 165, | |
| 172 | umask = 166, | |
| 173 | prctl = 167, | |
| 174 | getcpu = 168, | |
| 175 | gettimeofday = 169, | |
| 176 | settimeofday = 170, | |
| 177 | adjtimex = 171, | |
| 178 | getpid = 172, | |
| 179 | getppid = 173, | |
| 180 | getuid = 174, | |
| 181 | geteuid = 175, | |
| 182 | getgid = 176, | |
| 183 | getegid = 177, | |
| 184 | gettid = 178, | |
| 185 | sysinfo = 179, | |
| 186 | mq_open = 180, | |
| 187 | mq_unlink = 181, | |
| 188 | mq_timedsend = 182, | |
| 189 | mq_timedreceive = 183, | |
| 190 | mq_notify = 184, | |
| 191 | mq_getsetattr = 185, | |
| 192 | msgget = 186, | |
| 193 | msgctl = 187, | |
| 194 | msgrcv = 188, | |
| 195 | msgsnd = 189, | |
| 196 | semget = 190, | |
| 197 | semctl = 191, | |
| 198 | semtimedop = 192, | |
| 199 | semop = 193, | |
| 200 | shmget = 194, | |
| 201 | shmctl = 195, | |
| 202 | shmat = 196, | |
| 203 | shmdt = 197, | |
| 204 | socket = 198, | |
| 205 | socketpair = 199, | |
| 206 | bind = 200, | |
| 207 | listen = 201, | |
| 208 | accept = 202, | |
| 209 | connect = 203, | |
| 210 | getsockname = 204, | |
| 211 | getpeername = 205, | |
| 212 | sendto = 206, | |
| 213 | recvfrom = 207, | |
| 214 | setsockopt = 208, | |
| 215 | getsockopt = 209, | |
| 216 | shutdown = 210, | |
| 217 | sendmsg = 211, | |
| 218 | recvmsg = 212, | |
| 219 | readahead = 213, | |
| 220 | brk = 214, | |
| 221 | munmap = 215, | |
| 222 | mremap = 216, | |
| 223 | add_key = 217, | |
| 224 | request_key = 218, | |
| 225 | keyctl = 219, | |
| 226 | clone = 220, | |
| 227 | execve = 221, | |
| 228 | mmap = 222, | |
| 229 | fadvise64 = 223, | |
| 230 | swapon = 224, | |
| 231 | swapoff = 225, | |
| 232 | mprotect = 226, | |
| 233 | msync = 227, | |
| 234 | mlock = 228, | |
| 235 | munlock = 229, | |
| 236 | mlockall = 230, | |
| 237 | munlockall = 231, | |
| 238 | mincore = 232, | |
| 239 | madvise = 233, | |
| 240 | remap_file_pages = 234, | |
| 241 | mbind = 235, | |
| 242 | get_mempolicy = 236, | |
| 243 | set_mempolicy = 237, | |
| 244 | migrate_pages = 238, | |
| 245 | move_pages = 239, | |
| 246 | rt_tgsigqueueinfo = 240, | |
| 247 | perf_event_open = 241, | |
| 248 | accept4 = 242, | |
| 249 | recvmmsg = 243, | |
| 249 | 250 | |
| 250 | pub const SYS_arch_specific_syscall = 244; | |
| 251 | pub const SYS_riscv_flush_icache = SYS_arch_specific_syscall + 15; | |
| 251 | pub const arch_specific_syscall = 244; | |
| 252 | riscv_flush_icache = arch_specific_syscall + 15, | |
| 252 | 253 | |
| 253 | pub const SYS_wait4 = 260; | |
| 254 | pub const SYS_prlimit64 = 261; | |
| 255 | pub const SYS_fanotify_init = 262; | |
| 256 | pub const SYS_fanotify_mark = 263; | |
| 257 | pub const SYS_name_to_handle_at = 264; | |
| 258 | pub const SYS_open_by_handle_at = 265; | |
| 259 | pub const SYS_clock_adjtime = 266; | |
| 260 | pub const SYS_syncfs = 267; | |
| 261 | pub const SYS_setns = 268; | |
| 262 | pub const SYS_sendmmsg = 269; | |
| 263 | pub const SYS_process_vm_readv = 270; | |
| 264 | pub const SYS_process_vm_writev = 271; | |
| 265 | pub const SYS_kcmp = 272; | |
| 266 | pub const SYS_finit_module = 273; | |
| 267 | pub const SYS_sched_setattr = 274; | |
| 268 | pub const SYS_sched_getattr = 275; | |
| 269 | pub const SYS_renameat2 = 276; | |
| 270 | pub const SYS_seccomp = 277; | |
| 271 | pub const SYS_getrandom = 278; | |
| 272 | pub const SYS_memfd_create = 279; | |
| 273 | pub const SYS_bpf = 280; | |
| 274 | pub const SYS_execveat = 281; | |
| 275 | pub const SYS_userfaultfd = 282; | |
| 276 | pub const SYS_membarrier = 283; | |
| 277 | pub const SYS_mlock2 = 284; | |
| 278 | pub const SYS_copy_file_range = 285; | |
| 279 | pub const SYS_preadv2 = 286; | |
| 280 | pub const SYS_pwritev2 = 287; | |
| 281 | pub const SYS_pkey_mprotect = 288; | |
| 282 | pub const SYS_pkey_alloc = 289; | |
| 283 | pub const SYS_pkey_free = 290; | |
| 284 | pub const SYS_statx = 291; | |
| 285 | pub const SYS_io_pgetevents = 292; | |
| 286 | pub const SYS_rseq = 293; | |
| 287 | pub const SYS_kexec_file_load = 294; | |
| 288 | pub const SYS_pidfd_send_signal = 424; | |
| 289 | pub const SYS_io_uring_setup = 425; | |
| 290 | pub const SYS_io_uring_enter = 426; | |
| 291 | pub const SYS_io_uring_register = 427; | |
| 292 | pub const SYS_open_tree = 428; | |
| 293 | pub const SYS_move_mount = 429; | |
| 294 | pub const SYS_fsopen = 430; | |
| 295 | pub const SYS_fsconfig = 431; | |
| 296 | pub const SYS_fsmount = 432; | |
| 297 | pub const SYS_fspick = 433; | |
| 298 | pub const SYS_pidfd_open = 434; | |
| 299 | pub const SYS_clone3 = 435; | |
| 300 | pub const SYS_openat2 = 437; | |
| 301 | pub const SYS_pidfd_getfd = 438; | |
| 254 | wait4 = 260, | |
| 255 | prlimit64 = 261, | |
| 256 | fanotify_init = 262, | |
| 257 | fanotify_mark = 263, | |
| 258 | name_to_handle_at = 264, | |
| 259 | open_by_handle_at = 265, | |
| 260 | clock_adjtime = 266, | |
| 261 | syncfs = 267, | |
| 262 | setns = 268, | |
| 263 | sendmmsg = 269, | |
| 264 | process_vm_readv = 270, | |
| 265 | process_vm_writev = 271, | |
| 266 | kcmp = 272, | |
| 267 | finit_module = 273, | |
| 268 | sched_setattr = 274, | |
| 269 | sched_getattr = 275, | |
| 270 | renameat2 = 276, | |
| 271 | seccomp = 277, | |
| 272 | getrandom = 278, | |
| 273 | memfd_create = 279, | |
| 274 | bpf = 280, | |
| 275 | execveat = 281, | |
| 276 | userfaultfd = 282, | |
| 277 | membarrier = 283, | |
| 278 | mlock2 = 284, | |
| 279 | copy_file_range = 285, | |
| 280 | preadv2 = 286, | |
| 281 | pwritev2 = 287, | |
| 282 | pkey_mprotect = 288, | |
| 283 | pkey_alloc = 289, | |
| 284 | pkey_free = 290, | |
| 285 | statx = 291, | |
| 286 | io_pgetevents = 292, | |
| 287 | rseq = 293, | |
| 288 | kexec_file_load = 294, | |
| 289 | pidfd_send_signal = 424, | |
| 290 | io_uring_setup = 425, | |
| 291 | io_uring_enter = 426, | |
| 292 | io_uring_register = 427, | |
| 293 | open_tree = 428, | |
| 294 | move_mount = 429, | |
| 295 | fsopen = 430, | |
| 296 | fsconfig = 431, | |
| 297 | fsmount = 432, | |
| 298 | fspick = 433, | |
| 299 | pidfd_open = 434, | |
| 300 | clone3 = 435, | |
| 301 | openat2 = 437, | |
| 302 | pidfd_getfd = 438, | |
| 303 | ||
| 304 | _, | |
| 305 | }; | |
| 302 | 306 | |
| 303 | 307 | pub const O_CREAT = 0o100; |
| 304 | 308 | pub const O_EXCL = 0o200; |
lib/std/os/bits/linux/x86_64.zig+354-350| ... | ... | @@ -14,356 +14,360 @@ const iovec_const = linux.iovec_const; |
| 14 | 14 | |
| 15 | 15 | pub const mode_t = usize; |
| 16 | 16 | |
| 17 | pub const SYS_read = 0; | |
| 18 | pub const SYS_write = 1; | |
| 19 | pub const SYS_open = 2; | |
| 20 | pub const SYS_close = 3; | |
| 21 | pub const SYS_stat = 4; | |
| 22 | pub const SYS_fstat = 5; | |
| 23 | pub const SYS_lstat = 6; | |
| 24 | pub const SYS_poll = 7; | |
| 25 | pub const SYS_lseek = 8; | |
| 26 | pub const SYS_mmap = 9; | |
| 27 | pub const SYS_mprotect = 10; | |
| 28 | pub const SYS_munmap = 11; | |
| 29 | pub const SYS_brk = 12; | |
| 30 | pub const SYS_rt_sigaction = 13; | |
| 31 | pub const SYS_rt_sigprocmask = 14; | |
| 32 | pub const SYS_rt_sigreturn = 15; | |
| 33 | pub const SYS_ioctl = 16; | |
| 34 | pub const SYS_pread = 17; | |
| 35 | pub const SYS_pwrite = 18; | |
| 36 | pub const SYS_readv = 19; | |
| 37 | pub const SYS_writev = 20; | |
| 38 | pub const SYS_access = 21; | |
| 39 | pub const SYS_pipe = 22; | |
| 40 | pub const SYS_select = 23; | |
| 41 | pub const SYS_sched_yield = 24; | |
| 42 | pub const SYS_mremap = 25; | |
| 43 | pub const SYS_msync = 26; | |
| 44 | pub const SYS_mincore = 27; | |
| 45 | pub const SYS_madvise = 28; | |
| 46 | pub const SYS_shmget = 29; | |
| 47 | pub const SYS_shmat = 30; | |
| 48 | pub const SYS_shmctl = 31; | |
| 49 | pub const SYS_dup = 32; | |
| 50 | pub const SYS_dup2 = 33; | |
| 51 | pub const SYS_pause = 34; | |
| 52 | pub const SYS_nanosleep = 35; | |
| 53 | pub const SYS_getitimer = 36; | |
| 54 | pub const SYS_alarm = 37; | |
| 55 | pub const SYS_setitimer = 38; | |
| 56 | pub const SYS_getpid = 39; | |
| 57 | pub const SYS_sendfile = 40; | |
| 58 | pub const SYS_socket = 41; | |
| 59 | pub const SYS_connect = 42; | |
| 60 | pub const SYS_accept = 43; | |
| 61 | pub const SYS_sendto = 44; | |
| 62 | pub const SYS_recvfrom = 45; | |
| 63 | pub const SYS_sendmsg = 46; | |
| 64 | pub const SYS_recvmsg = 47; | |
| 65 | pub const SYS_shutdown = 48; | |
| 66 | pub const SYS_bind = 49; | |
| 67 | pub const SYS_listen = 50; | |
| 68 | pub const SYS_getsockname = 51; | |
| 69 | pub const SYS_getpeername = 52; | |
| 70 | pub const SYS_socketpair = 53; | |
| 71 | pub const SYS_setsockopt = 54; | |
| 72 | pub const SYS_getsockopt = 55; | |
| 73 | pub const SYS_clone = 56; | |
| 74 | pub const SYS_fork = 57; | |
| 75 | pub const SYS_vfork = 58; | |
| 76 | pub const SYS_execve = 59; | |
| 77 | pub const SYS_exit = 60; | |
| 78 | pub const SYS_wait4 = 61; | |
| 79 | pub const SYS_kill = 62; | |
| 80 | pub const SYS_uname = 63; | |
| 81 | pub const SYS_semget = 64; | |
| 82 | pub const SYS_semop = 65; | |
| 83 | pub const SYS_semctl = 66; | |
| 84 | pub const SYS_shmdt = 67; | |
| 85 | pub const SYS_msgget = 68; | |
| 86 | pub const SYS_msgsnd = 69; | |
| 87 | pub const SYS_msgrcv = 70; | |
| 88 | pub const SYS_msgctl = 71; | |
| 89 | pub const SYS_fcntl = 72; | |
| 90 | pub const SYS_flock = 73; | |
| 91 | pub const SYS_fsync = 74; | |
| 92 | pub const SYS_fdatasync = 75; | |
| 93 | pub const SYS_truncate = 76; | |
| 94 | pub const SYS_ftruncate = 77; | |
| 95 | pub const SYS_getdents = 78; | |
| 96 | pub const SYS_getcwd = 79; | |
| 97 | pub const SYS_chdir = 80; | |
| 98 | pub const SYS_fchdir = 81; | |
| 99 | pub const SYS_rename = 82; | |
| 100 | pub const SYS_mkdir = 83; | |
| 101 | pub const SYS_rmdir = 84; | |
| 102 | pub const SYS_creat = 85; | |
| 103 | pub const SYS_link = 86; | |
| 104 | pub const SYS_unlink = 87; | |
| 105 | pub const SYS_symlink = 88; | |
| 106 | pub const SYS_readlink = 89; | |
| 107 | pub const SYS_chmod = 90; | |
| 108 | pub const SYS_fchmod = 91; | |
| 109 | pub const SYS_chown = 92; | |
| 110 | pub const SYS_fchown = 93; | |
| 111 | pub const SYS_lchown = 94; | |
| 112 | pub const SYS_umask = 95; | |
| 113 | pub const SYS_gettimeofday = 96; | |
| 114 | pub const SYS_getrlimit = 97; | |
| 115 | pub const SYS_getrusage = 98; | |
| 116 | pub const SYS_sysinfo = 99; | |
| 117 | pub const SYS_times = 100; | |
| 118 | pub const SYS_ptrace = 101; | |
| 119 | pub const SYS_getuid = 102; | |
| 120 | pub const SYS_syslog = 103; | |
| 121 | pub const SYS_getgid = 104; | |
| 122 | pub const SYS_setuid = 105; | |
| 123 | pub const SYS_setgid = 106; | |
| 124 | pub const SYS_geteuid = 107; | |
| 125 | pub const SYS_getegid = 108; | |
| 126 | pub const SYS_setpgid = 109; | |
| 127 | pub const SYS_getppid = 110; | |
| 128 | pub const SYS_getpgrp = 111; | |
| 129 | pub const SYS_setsid = 112; | |
| 130 | pub const SYS_setreuid = 113; | |
| 131 | pub const SYS_setregid = 114; | |
| 132 | pub const SYS_getgroups = 115; | |
| 133 | pub const SYS_setgroups = 116; | |
| 134 | pub const SYS_setresuid = 117; | |
| 135 | pub const SYS_getresuid = 118; | |
| 136 | pub const SYS_setresgid = 119; | |
| 137 | pub const SYS_getresgid = 120; | |
| 138 | pub const SYS_getpgid = 121; | |
| 139 | pub const SYS_setfsuid = 122; | |
| 140 | pub const SYS_setfsgid = 123; | |
| 141 | pub const SYS_getsid = 124; | |
| 142 | pub const SYS_capget = 125; | |
| 143 | pub const SYS_capset = 126; | |
| 144 | pub const SYS_rt_sigpending = 127; | |
| 145 | pub const SYS_rt_sigtimedwait = 128; | |
| 146 | pub const SYS_rt_sigqueueinfo = 129; | |
| 147 | pub const SYS_rt_sigsuspend = 130; | |
| 148 | pub const SYS_sigaltstack = 131; | |
| 149 | pub const SYS_utime = 132; | |
| 150 | pub const SYS_mknod = 133; | |
| 151 | pub const SYS_uselib = 134; | |
| 152 | pub const SYS_personality = 135; | |
| 153 | pub const SYS_ustat = 136; | |
| 154 | pub const SYS_statfs = 137; | |
| 155 | pub const SYS_fstatfs = 138; | |
| 156 | pub const SYS_sysfs = 139; | |
| 157 | pub const SYS_getpriority = 140; | |
| 158 | pub const SYS_setpriority = 141; | |
| 159 | pub const SYS_sched_setparam = 142; | |
| 160 | pub const SYS_sched_getparam = 143; | |
| 161 | pub const SYS_sched_setscheduler = 144; | |
| 162 | pub const SYS_sched_getscheduler = 145; | |
| 163 | pub const SYS_sched_get_priority_max = 146; | |
| 164 | pub const SYS_sched_get_priority_min = 147; | |
| 165 | pub const SYS_sched_rr_get_interval = 148; | |
| 166 | pub const SYS_mlock = 149; | |
| 167 | pub const SYS_munlock = 150; | |
| 168 | pub const SYS_mlockall = 151; | |
| 169 | pub const SYS_munlockall = 152; | |
| 170 | pub const SYS_vhangup = 153; | |
| 171 | pub const SYS_modify_ldt = 154; | |
| 172 | pub const SYS_pivot_root = 155; | |
| 173 | pub const SYS__sysctl = 156; | |
| 174 | pub const SYS_prctl = 157; | |
| 175 | pub const SYS_arch_prctl = 158; | |
| 176 | pub const SYS_adjtimex = 159; | |
| 177 | pub const SYS_setrlimit = 160; | |
| 178 | pub const SYS_chroot = 161; | |
| 179 | pub const SYS_sync = 162; | |
| 180 | pub const SYS_acct = 163; | |
| 181 | pub const SYS_settimeofday = 164; | |
| 182 | pub const SYS_mount = 165; | |
| 183 | pub const SYS_umount2 = 166; | |
| 184 | pub const SYS_swapon = 167; | |
| 185 | pub const SYS_swapoff = 168; | |
| 186 | pub const SYS_reboot = 169; | |
| 187 | pub const SYS_sethostname = 170; | |
| 188 | pub const SYS_setdomainname = 171; | |
| 189 | pub const SYS_iopl = 172; | |
| 190 | pub const SYS_ioperm = 173; | |
| 191 | pub const SYS_create_module = 174; | |
| 192 | pub const SYS_init_module = 175; | |
| 193 | pub const SYS_delete_module = 176; | |
| 194 | pub const SYS_get_kernel_syms = 177; | |
| 195 | pub const SYS_query_module = 178; | |
| 196 | pub const SYS_quotactl = 179; | |
| 197 | pub const SYS_nfsservctl = 180; | |
| 198 | pub const SYS_getpmsg = 181; | |
| 199 | pub const SYS_putpmsg = 182; | |
| 200 | pub const SYS_afs_syscall = 183; | |
| 201 | pub const SYS_tuxcall = 184; | |
| 202 | pub const SYS_security = 185; | |
| 203 | pub const SYS_gettid = 186; | |
| 204 | pub const SYS_readahead = 187; | |
| 205 | pub const SYS_setxattr = 188; | |
| 206 | pub const SYS_lsetxattr = 189; | |
| 207 | pub const SYS_fsetxattr = 190; | |
| 208 | pub const SYS_getxattr = 191; | |
| 209 | pub const SYS_lgetxattr = 192; | |
| 210 | pub const SYS_fgetxattr = 193; | |
| 211 | pub const SYS_listxattr = 194; | |
| 212 | pub const SYS_llistxattr = 195; | |
| 213 | pub const SYS_flistxattr = 196; | |
| 214 | pub const SYS_removexattr = 197; | |
| 215 | pub const SYS_lremovexattr = 198; | |
| 216 | pub const SYS_fremovexattr = 199; | |
| 217 | pub const SYS_tkill = 200; | |
| 218 | pub const SYS_time = 201; | |
| 219 | pub const SYS_futex = 202; | |
| 220 | pub const SYS_sched_setaffinity = 203; | |
| 221 | pub const SYS_sched_getaffinity = 204; | |
| 222 | pub const SYS_set_thread_area = 205; | |
| 223 | pub const SYS_io_setup = 206; | |
| 224 | pub const SYS_io_destroy = 207; | |
| 225 | pub const SYS_io_getevents = 208; | |
| 226 | pub const SYS_io_submit = 209; | |
| 227 | pub const SYS_io_cancel = 210; | |
| 228 | pub const SYS_get_thread_area = 211; | |
| 229 | pub const SYS_lookup_dcookie = 212; | |
| 230 | pub const SYS_epoll_create = 213; | |
| 231 | pub const SYS_epoll_ctl_old = 214; | |
| 232 | pub const SYS_epoll_wait_old = 215; | |
| 233 | pub const SYS_remap_file_pages = 216; | |
| 234 | pub const SYS_getdents64 = 217; | |
| 235 | pub const SYS_set_tid_address = 218; | |
| 236 | pub const SYS_restart_syscall = 219; | |
| 237 | pub const SYS_semtimedop = 220; | |
| 238 | pub const SYS_fadvise64 = 221; | |
| 239 | pub const SYS_timer_create = 222; | |
| 240 | pub const SYS_timer_settime = 223; | |
| 241 | pub const SYS_timer_gettime = 224; | |
| 242 | pub const SYS_timer_getoverrun = 225; | |
| 243 | pub const SYS_timer_delete = 226; | |
| 244 | pub const SYS_clock_settime = 227; | |
| 245 | pub const SYS_clock_gettime = 228; | |
| 246 | pub const SYS_clock_getres = 229; | |
| 247 | pub const SYS_clock_nanosleep = 230; | |
| 248 | pub const SYS_exit_group = 231; | |
| 249 | pub const SYS_epoll_wait = 232; | |
| 250 | pub const SYS_epoll_ctl = 233; | |
| 251 | pub const SYS_tgkill = 234; | |
| 252 | pub const SYS_utimes = 235; | |
| 253 | pub const SYS_vserver = 236; | |
| 254 | pub const SYS_mbind = 237; | |
| 255 | pub const SYS_set_mempolicy = 238; | |
| 256 | pub const SYS_get_mempolicy = 239; | |
| 257 | pub const SYS_mq_open = 240; | |
| 258 | pub const SYS_mq_unlink = 241; | |
| 259 | pub const SYS_mq_timedsend = 242; | |
| 260 | pub const SYS_mq_timedreceive = 243; | |
| 261 | pub const SYS_mq_notify = 244; | |
| 262 | pub const SYS_mq_getsetattr = 245; | |
| 263 | pub const SYS_kexec_load = 246; | |
| 264 | pub const SYS_waitid = 247; | |
| 265 | pub const SYS_add_key = 248; | |
| 266 | pub const SYS_request_key = 249; | |
| 267 | pub const SYS_keyctl = 250; | |
| 268 | pub const SYS_ioprio_set = 251; | |
| 269 | pub const SYS_ioprio_get = 252; | |
| 270 | pub const SYS_inotify_init = 253; | |
| 271 | pub const SYS_inotify_add_watch = 254; | |
| 272 | pub const SYS_inotify_rm_watch = 255; | |
| 273 | pub const SYS_migrate_pages = 256; | |
| 274 | pub const SYS_openat = 257; | |
| 275 | pub const SYS_mkdirat = 258; | |
| 276 | pub const SYS_mknodat = 259; | |
| 277 | pub const SYS_fchownat = 260; | |
| 278 | pub const SYS_futimesat = 261; | |
| 279 | pub const SYS_newfstatat = 262; | |
| 280 | pub const SYS_fstatat = 262; | |
| 281 | pub const SYS_unlinkat = 263; | |
| 282 | pub const SYS_renameat = 264; | |
| 283 | pub const SYS_linkat = 265; | |
| 284 | pub const SYS_symlinkat = 266; | |
| 285 | pub const SYS_readlinkat = 267; | |
| 286 | pub const SYS_fchmodat = 268; | |
| 287 | pub const SYS_faccessat = 269; | |
| 288 | pub const SYS_pselect6 = 270; | |
| 289 | pub const SYS_ppoll = 271; | |
| 290 | pub const SYS_unshare = 272; | |
| 291 | pub const SYS_set_robust_list = 273; | |
| 292 | pub const SYS_get_robust_list = 274; | |
| 293 | pub const SYS_splice = 275; | |
| 294 | pub const SYS_tee = 276; | |
| 295 | pub const SYS_sync_file_range = 277; | |
| 296 | pub const SYS_vmsplice = 278; | |
| 297 | pub const SYS_move_pages = 279; | |
| 298 | pub const SYS_utimensat = 280; | |
| 299 | pub const SYS_epoll_pwait = 281; | |
| 300 | pub const SYS_signalfd = 282; | |
| 301 | pub const SYS_timerfd_create = 283; | |
| 302 | pub const SYS_eventfd = 284; | |
| 303 | pub const SYS_fallocate = 285; | |
| 304 | pub const SYS_timerfd_settime = 286; | |
| 305 | pub const SYS_timerfd_gettime = 287; | |
| 306 | pub const SYS_accept4 = 288; | |
| 307 | pub const SYS_signalfd4 = 289; | |
| 308 | pub const SYS_eventfd2 = 290; | |
| 309 | pub const SYS_epoll_create1 = 291; | |
| 310 | pub const SYS_dup3 = 292; | |
| 311 | pub const SYS_pipe2 = 293; | |
| 312 | pub const SYS_inotify_init1 = 294; | |
| 313 | pub const SYS_preadv = 295; | |
| 314 | pub const SYS_pwritev = 296; | |
| 315 | pub const SYS_rt_tgsigqueueinfo = 297; | |
| 316 | pub const SYS_perf_event_open = 298; | |
| 317 | pub const SYS_recvmmsg = 299; | |
| 318 | pub const SYS_fanotify_init = 300; | |
| 319 | pub const SYS_fanotify_mark = 301; | |
| 320 | pub const SYS_prlimit64 = 302; | |
| 321 | pub const SYS_name_to_handle_at = 303; | |
| 322 | pub const SYS_open_by_handle_at = 304; | |
| 323 | pub const SYS_clock_adjtime = 305; | |
| 324 | pub const SYS_syncfs = 306; | |
| 325 | pub const SYS_sendmmsg = 307; | |
| 326 | pub const SYS_setns = 308; | |
| 327 | pub const SYS_getcpu = 309; | |
| 328 | pub const SYS_process_vm_readv = 310; | |
| 329 | pub const SYS_process_vm_writev = 311; | |
| 330 | pub const SYS_kcmp = 312; | |
| 331 | pub const SYS_finit_module = 313; | |
| 332 | pub const SYS_sched_setattr = 314; | |
| 333 | pub const SYS_sched_getattr = 315; | |
| 334 | pub const SYS_renameat2 = 316; | |
| 335 | pub const SYS_seccomp = 317; | |
| 336 | pub const SYS_getrandom = 318; | |
| 337 | pub const SYS_memfd_create = 319; | |
| 338 | pub const SYS_kexec_file_load = 320; | |
| 339 | pub const SYS_bpf = 321; | |
| 340 | pub const SYS_execveat = 322; | |
| 341 | pub const SYS_userfaultfd = 323; | |
| 342 | pub const SYS_membarrier = 324; | |
| 343 | pub const SYS_mlock2 = 325; | |
| 344 | pub const SYS_copy_file_range = 326; | |
| 345 | pub const SYS_preadv2 = 327; | |
| 346 | pub const SYS_pwritev2 = 328; | |
| 347 | pub const SYS_pkey_mprotect = 329; | |
| 348 | pub const SYS_pkey_alloc = 330; | |
| 349 | pub const SYS_pkey_free = 331; | |
| 350 | pub const SYS_statx = 332; | |
| 351 | pub const SYS_io_pgetevents = 333; | |
| 352 | pub const SYS_rseq = 334; | |
| 353 | pub const SYS_pidfd_send_signal = 424; | |
| 354 | pub const SYS_io_uring_setup = 425; | |
| 355 | pub const SYS_io_uring_enter = 426; | |
| 356 | pub const SYS_io_uring_register = 427; | |
| 357 | pub const SYS_open_tree = 428; | |
| 358 | pub const SYS_move_mount = 429; | |
| 359 | pub const SYS_fsopen = 430; | |
| 360 | pub const SYS_fsconfig = 431; | |
| 361 | pub const SYS_fsmount = 432; | |
| 362 | pub const SYS_fspick = 433; | |
| 363 | pub const SYS_pidfd_open = 434; | |
| 364 | pub const SYS_clone3 = 435; | |
| 365 | pub const SYS_openat2 = 437; | |
| 366 | pub const SYS_pidfd_getfd = 438; | |
| 17 | pub const SYS = extern enum(usize) { | |
| 18 | read = 0, | |
| 19 | write = 1, | |
| 20 | open = 2, | |
| 21 | close = 3, | |
| 22 | stat = 4, | |
| 23 | fstat = 5, | |
| 24 | lstat = 6, | |
| 25 | poll = 7, | |
| 26 | lseek = 8, | |
| 27 | mmap = 9, | |
| 28 | mprotect = 10, | |
| 29 | munmap = 11, | |
| 30 | brk = 12, | |
| 31 | rt_sigaction = 13, | |
| 32 | rt_sigprocmask = 14, | |
| 33 | rt_sigreturn = 15, | |
| 34 | ioctl = 16, | |
| 35 | pread = 17, | |
| 36 | pwrite = 18, | |
| 37 | readv = 19, | |
| 38 | writev = 20, | |
| 39 | access = 21, | |
| 40 | pipe = 22, | |
| 41 | select = 23, | |
| 42 | sched_yield = 24, | |
| 43 | mremap = 25, | |
| 44 | msync = 26, | |
| 45 | mincore = 27, | |
| 46 | madvise = 28, | |
| 47 | shmget = 29, | |
| 48 | shmat = 30, | |
| 49 | shmctl = 31, | |
| 50 | dup = 32, | |
| 51 | dup2 = 33, | |
| 52 | pause = 34, | |
| 53 | nanosleep = 35, | |
| 54 | getitimer = 36, | |
| 55 | alarm = 37, | |
| 56 | setitimer = 38, | |
| 57 | getpid = 39, | |
| 58 | sendfile = 40, | |
| 59 | socket = 41, | |
| 60 | connect = 42, | |
| 61 | accept = 43, | |
| 62 | sendto = 44, | |
| 63 | recvfrom = 45, | |
| 64 | sendmsg = 46, | |
| 65 | recvmsg = 47, | |
| 66 | shutdown = 48, | |
| 67 | bind = 49, | |
| 68 | listen = 50, | |
| 69 | getsockname = 51, | |
| 70 | getpeername = 52, | |
| 71 | socketpair = 53, | |
| 72 | setsockopt = 54, | |
| 73 | getsockopt = 55, | |
| 74 | clone = 56, | |
| 75 | fork = 57, | |
| 76 | vfork = 58, | |
| 77 | execve = 59, | |
| 78 | exit = 60, | |
| 79 | wait4 = 61, | |
| 80 | kill = 62, | |
| 81 | uname = 63, | |
| 82 | semget = 64, | |
| 83 | semop = 65, | |
| 84 | semctl = 66, | |
| 85 | shmdt = 67, | |
| 86 | msgget = 68, | |
| 87 | msgsnd = 69, | |
| 88 | msgrcv = 70, | |
| 89 | msgctl = 71, | |
| 90 | fcntl = 72, | |
| 91 | flock = 73, | |
| 92 | fsync = 74, | |
| 93 | fdatasync = 75, | |
| 94 | truncate = 76, | |
| 95 | ftruncate = 77, | |
| 96 | getdents = 78, | |
| 97 | getcwd = 79, | |
| 98 | chdir = 80, | |
| 99 | fchdir = 81, | |
| 100 | rename = 82, | |
| 101 | mkdir = 83, | |
| 102 | rmdir = 84, | |
| 103 | creat = 85, | |
| 104 | link = 86, | |
| 105 | unlink = 87, | |
| 106 | symlink = 88, | |
| 107 | readlink = 89, | |
| 108 | chmod = 90, | |
| 109 | fchmod = 91, | |
| 110 | chown = 92, | |
| 111 | fchown = 93, | |
| 112 | lchown = 94, | |
| 113 | umask = 95, | |
| 114 | gettimeofday = 96, | |
| 115 | getrlimit = 97, | |
| 116 | getrusage = 98, | |
| 117 | sysinfo = 99, | |
| 118 | times = 100, | |
| 119 | ptrace = 101, | |
| 120 | getuid = 102, | |
| 121 | syslog = 103, | |
| 122 | getgid = 104, | |
| 123 | setuid = 105, | |
| 124 | setgid = 106, | |
| 125 | geteuid = 107, | |
| 126 | getegid = 108, | |
| 127 | setpgid = 109, | |
| 128 | getppid = 110, | |
| 129 | getpgrp = 111, | |
| 130 | setsid = 112, | |
| 131 | setreuid = 113, | |
| 132 | setregid = 114, | |
| 133 | getgroups = 115, | |
| 134 | setgroups = 116, | |
| 135 | setresuid = 117, | |
| 136 | getresuid = 118, | |
| 137 | setresgid = 119, | |
| 138 | getresgid = 120, | |
| 139 | getpgid = 121, | |
| 140 | setfsuid = 122, | |
| 141 | setfsgid = 123, | |
| 142 | getsid = 124, | |
| 143 | capget = 125, | |
| 144 | capset = 126, | |
| 145 | rt_sigpending = 127, | |
| 146 | rt_sigtimedwait = 128, | |
| 147 | rt_sigqueueinfo = 129, | |
| 148 | rt_sigsuspend = 130, | |
| 149 | sigaltstack = 131, | |
| 150 | utime = 132, | |
| 151 | mknod = 133, | |
| 152 | uselib = 134, | |
| 153 | personality = 135, | |
| 154 | ustat = 136, | |
| 155 | statfs = 137, | |
| 156 | fstatfs = 138, | |
| 157 | sysfs = 139, | |
| 158 | getpriority = 140, | |
| 159 | setpriority = 141, | |
| 160 | sched_setparam = 142, | |
| 161 | sched_getparam = 143, | |
| 162 | sched_setscheduler = 144, | |
| 163 | sched_getscheduler = 145, | |
| 164 | sched_get_priority_max = 146, | |
| 165 | sched_get_priority_min = 147, | |
| 166 | sched_rr_get_interval = 148, | |
| 167 | mlock = 149, | |
| 168 | munlock = 150, | |
| 169 | mlockall = 151, | |
| 170 | munlockall = 152, | |
| 171 | vhangup = 153, | |
| 172 | modify_ldt = 154, | |
| 173 | pivot_root = 155, | |
| 174 | _sysctl = 156, | |
| 175 | prctl = 157, | |
| 176 | arch_prctl = 158, | |
| 177 | adjtimex = 159, | |
| 178 | setrlimit = 160, | |
| 179 | chroot = 161, | |
| 180 | sync = 162, | |
| 181 | acct = 163, | |
| 182 | settimeofday = 164, | |
| 183 | mount = 165, | |
| 184 | umount2 = 166, | |
| 185 | swapon = 167, | |
| 186 | swapoff = 168, | |
| 187 | reboot = 169, | |
| 188 | sethostname = 170, | |
| 189 | setdomainname = 171, | |
| 190 | iopl = 172, | |
| 191 | ioperm = 173, | |
| 192 | create_module = 174, | |
| 193 | init_module = 175, | |
| 194 | delete_module = 176, | |
| 195 | get_kernel_syms = 177, | |
| 196 | query_module = 178, | |
| 197 | quotactl = 179, | |
| 198 | nfsservctl = 180, | |
| 199 | getpmsg = 181, | |
| 200 | putpmsg = 182, | |
| 201 | afs_syscall = 183, | |
| 202 | tuxcall = 184, | |
| 203 | security = 185, | |
| 204 | gettid = 186, | |
| 205 | readahead = 187, | |
| 206 | setxattr = 188, | |
| 207 | lsetxattr = 189, | |
| 208 | fsetxattr = 190, | |
| 209 | getxattr = 191, | |
| 210 | lgetxattr = 192, | |
| 211 | fgetxattr = 193, | |
| 212 | listxattr = 194, | |
| 213 | llistxattr = 195, | |
| 214 | flistxattr = 196, | |
| 215 | removexattr = 197, | |
| 216 | lremovexattr = 198, | |
| 217 | fremovexattr = 199, | |
| 218 | tkill = 200, | |
| 219 | time = 201, | |
| 220 | futex = 202, | |
| 221 | sched_setaffinity = 203, | |
| 222 | sched_getaffinity = 204, | |
| 223 | set_thread_area = 205, | |
| 224 | io_setup = 206, | |
| 225 | io_destroy = 207, | |
| 226 | io_getevents = 208, | |
| 227 | io_submit = 209, | |
| 228 | io_cancel = 210, | |
| 229 | get_thread_area = 211, | |
| 230 | lookup_dcookie = 212, | |
| 231 | epoll_create = 213, | |
| 232 | epoll_ctl_old = 214, | |
| 233 | epoll_wait_old = 215, | |
| 234 | remap_file_pages = 216, | |
| 235 | getdents64 = 217, | |
| 236 | set_tid_address = 218, | |
| 237 | restart_syscall = 219, | |
| 238 | semtimedop = 220, | |
| 239 | fadvise64 = 221, | |
| 240 | timer_create = 222, | |
| 241 | timer_settime = 223, | |
| 242 | timer_gettime = 224, | |
| 243 | timer_getoverrun = 225, | |
| 244 | timer_delete = 226, | |
| 245 | clock_settime = 227, | |
| 246 | clock_gettime = 228, | |
| 247 | clock_getres = 229, | |
| 248 | clock_nanosleep = 230, | |
| 249 | exit_group = 231, | |
| 250 | epoll_wait = 232, | |
| 251 | epoll_ctl = 233, | |
| 252 | tgkill = 234, | |
| 253 | utimes = 235, | |
| 254 | vserver = 236, | |
| 255 | mbind = 237, | |
| 256 | set_mempolicy = 238, | |
| 257 | get_mempolicy = 239, | |
| 258 | mq_open = 240, | |
| 259 | mq_unlink = 241, | |
| 260 | mq_timedsend = 242, | |
| 261 | mq_timedreceive = 243, | |
| 262 | mq_notify = 244, | |
| 263 | mq_getsetattr = 245, | |
| 264 | kexec_load = 246, | |
| 265 | waitid = 247, | |
| 266 | add_key = 248, | |
| 267 | request_key = 249, | |
| 268 | keyctl = 250, | |
| 269 | ioprio_set = 251, | |
| 270 | ioprio_get = 252, | |
| 271 | inotify_init = 253, | |
| 272 | inotify_add_watch = 254, | |
| 273 | inotify_rm_watch = 255, | |
| 274 | migrate_pages = 256, | |
| 275 | openat = 257, | |
| 276 | mkdirat = 258, | |
| 277 | mknodat = 259, | |
| 278 | fchownat = 260, | |
| 279 | futimesat = 261, | |
| 280 | newfstatat = 262, | |
| 281 | fstatat = 262, | |
| 282 | unlinkat = 263, | |
| 283 | renameat = 264, | |
| 284 | linkat = 265, | |
| 285 | symlinkat = 266, | |
| 286 | readlinkat = 267, | |
| 287 | fchmodat = 268, | |
| 288 | faccessat = 269, | |
| 289 | pselect6 = 270, | |
| 290 | ppoll = 271, | |
| 291 | unshare = 272, | |
| 292 | set_robust_list = 273, | |
| 293 | get_robust_list = 274, | |
| 294 | splice = 275, | |
| 295 | tee = 276, | |
| 296 | sync_file_range = 277, | |
| 297 | vmsplice = 278, | |
| 298 | move_pages = 279, | |
| 299 | utimensat = 280, | |
| 300 | epoll_pwait = 281, | |
| 301 | signalfd = 282, | |
| 302 | timerfd_create = 283, | |
| 303 | eventfd = 284, | |
| 304 | fallocate = 285, | |
| 305 | timerfd_settime = 286, | |
| 306 | timerfd_gettime = 287, | |
| 307 | accept4 = 288, | |
| 308 | signalfd4 = 289, | |
| 309 | eventfd2 = 290, | |
| 310 | epoll_create1 = 291, | |
| 311 | dup3 = 292, | |
| 312 | pipe2 = 293, | |
| 313 | inotify_init1 = 294, | |
| 314 | preadv = 295, | |
| 315 | pwritev = 296, | |
| 316 | rt_tgsigqueueinfo = 297, | |
| 317 | perf_event_open = 298, | |
| 318 | recvmmsg = 299, | |
| 319 | fanotify_init = 300, | |
| 320 | fanotify_mark = 301, | |
| 321 | prlimit64 = 302, | |
| 322 | name_to_handle_at = 303, | |
| 323 | open_by_handle_at = 304, | |
| 324 | clock_adjtime = 305, | |
| 325 | syncfs = 306, | |
| 326 | sendmmsg = 307, | |
| 327 | setns = 308, | |
| 328 | getcpu = 309, | |
| 329 | process_vm_readv = 310, | |
| 330 | process_vm_writev = 311, | |
| 331 | kcmp = 312, | |
| 332 | finit_module = 313, | |
| 333 | sched_setattr = 314, | |
| 334 | sched_getattr = 315, | |
| 335 | renameat2 = 316, | |
| 336 | seccomp = 317, | |
| 337 | getrandom = 318, | |
| 338 | memfd_create = 319, | |
| 339 | kexec_file_load = 320, | |
| 340 | bpf = 321, | |
| 341 | execveat = 322, | |
| 342 | userfaultfd = 323, | |
| 343 | membarrier = 324, | |
| 344 | mlock2 = 325, | |
| 345 | copy_file_range = 326, | |
| 346 | preadv2 = 327, | |
| 347 | pwritev2 = 328, | |
| 348 | pkey_mprotect = 329, | |
| 349 | pkey_alloc = 330, | |
| 350 | pkey_free = 331, | |
| 351 | statx = 332, | |
| 352 | io_pgetevents = 333, | |
| 353 | rseq = 334, | |
| 354 | pidfd_send_signal = 424, | |
| 355 | io_uring_setup = 425, | |
| 356 | io_uring_enter = 426, | |
| 357 | io_uring_register = 427, | |
| 358 | open_tree = 428, | |
| 359 | move_mount = 429, | |
| 360 | fsopen = 430, | |
| 361 | fsconfig = 431, | |
| 362 | fsmount = 432, | |
| 363 | fspick = 433, | |
| 364 | pidfd_open = 434, | |
| 365 | clone3 = 435, | |
| 366 | openat2 = 437, | |
| 367 | pidfd_getfd = 438, | |
| 368 | ||
| 369 | _, | |
| 370 | }; | |
| 367 | 371 | |
| 368 | 372 | pub const O_CREAT = 0o100; |
| 369 | 373 | pub const O_EXCL = 0o200; |
lib/std/os/linux.zig+227-227| ... | ... | @@ -53,46 +53,46 @@ pub fn getErrno(r: usize) u12 { |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | pub fn dup2(old: i32, new: i32) usize { |
| 56 | if (@hasDecl(@This(), "SYS_dup2")) { | |
| 57 | return syscall2(SYS_dup2, @bitCast(usize, @as(isize, old)), @bitCast(usize, @as(isize, new))); | |
| 56 | if (@hasField(SYS, "dup2")) { | |
| 57 | return syscall2(.dup2, @bitCast(usize, @as(isize, old)), @bitCast(usize, @as(isize, new))); | |
| 58 | 58 | } else { |
| 59 | 59 | if (old == new) { |
| 60 | 60 | if (std.debug.runtime_safety) { |
| 61 | const rc = syscall2(SYS_fcntl, @bitCast(usize, @as(isize, old)), F_GETFD); | |
| 61 | const rc = syscall2(.fcntl, @bitCast(usize, @as(isize, old)), F_GETFD); | |
| 62 | 62 | if (@bitCast(isize, rc) < 0) return rc; |
| 63 | 63 | } |
| 64 | 64 | return @intCast(usize, old); |
| 65 | 65 | } else { |
| 66 | return syscall3(SYS_dup3, @bitCast(usize, @as(isize, old)), @bitCast(usize, @as(isize, new)), 0); | |
| 66 | return syscall3(.dup3, @bitCast(usize, @as(isize, old)), @bitCast(usize, @as(isize, new)), 0); | |
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | pub fn dup3(old: i32, new: i32, flags: u32) usize { |
| 72 | return syscall3(SYS_dup3, @bitCast(usize, @as(isize, old)), @bitCast(usize, @as(isize, new)), flags); | |
| 72 | return syscall3(.dup3, @bitCast(usize, @as(isize, old)), @bitCast(usize, @as(isize, new)), flags); | |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | pub fn chdir(path: [*:0]const u8) usize { |
| 76 | return syscall1(SYS_chdir, @ptrToInt(path)); | |
| 76 | return syscall1(.chdir, @ptrToInt(path)); | |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | pub fn fchdir(fd: fd_t) usize { |
| 80 | return syscall1(SYS_fchdir, @bitCast(usize, @as(isize, fd))); | |
| 80 | return syscall1(.fchdir, @bitCast(usize, @as(isize, fd))); | |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | pub fn chroot(path: [*:0]const u8) usize { |
| 84 | return syscall1(SYS_chroot, @ptrToInt(path)); | |
| 84 | return syscall1(.chroot, @ptrToInt(path)); | |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | pub fn execve(path: [*:0]const u8, argv: [*:null]const ?[*:0]const u8, envp: [*:null]const ?[*:0]const u8) usize { |
| 88 | return syscall3(SYS_execve, @ptrToInt(path), @ptrToInt(argv), @ptrToInt(envp)); | |
| 88 | return syscall3(.execve, @ptrToInt(path), @ptrToInt(argv), @ptrToInt(envp)); | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | pub fn fork() usize { |
| 92 | if (@hasDecl(@This(), "SYS_fork")) { | |
| 93 | return syscall0(SYS_fork); | |
| 92 | if (@hasField(SYS, "fork")) { | |
| 93 | return syscall0(.fork); | |
| 94 | 94 | } else { |
| 95 | return syscall2(SYS_clone, SIGCHLD, 0); | |
| 95 | return syscall2(.clone, SIGCHLD, 0); | |
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | |
| ... | ... | @@ -102,7 +102,7 @@ pub fn fork() usize { |
| 102 | 102 | /// the compiler is not aware of how vfork affects control flow and you may |
| 103 | 103 | /// see different results in optimized builds. |
| 104 | 104 | pub inline fn vfork() usize { |
| 105 | return @call(.{ .modifier = .always_inline }, syscall0, .{SYS_vfork}); | |
| 105 | return @call(.{ .modifier = .always_inline }, syscall0, .{.vfork}); | |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | pub fn futimens(fd: i32, times: *const [2]timespec) usize { |
| ... | ... | @@ -110,24 +110,24 @@ pub fn futimens(fd: i32, times: *const [2]timespec) usize { |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | pub fn utimensat(dirfd: i32, path: ?[*:0]const u8, times: *const [2]timespec, flags: u32) usize { |
| 113 | return syscall4(SYS_utimensat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), @ptrToInt(times), flags); | |
| 113 | return syscall4(.utimensat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), @ptrToInt(times), flags); | |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | pub fn futex_wait(uaddr: *const i32, futex_op: u32, val: i32, timeout: ?*timespec) usize { |
| 117 | return syscall4(SYS_futex, @ptrToInt(uaddr), futex_op, @bitCast(u32, val), @ptrToInt(timeout)); | |
| 117 | return syscall4(.futex, @ptrToInt(uaddr), futex_op, @bitCast(u32, val), @ptrToInt(timeout)); | |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | pub fn futex_wake(uaddr: *const i32, futex_op: u32, val: i32) usize { |
| 121 | return syscall3(SYS_futex, @ptrToInt(uaddr), futex_op, @bitCast(u32, val)); | |
| 121 | return syscall3(.futex, @ptrToInt(uaddr), futex_op, @bitCast(u32, val)); | |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | pub fn getcwd(buf: [*]u8, size: usize) usize { |
| 125 | return syscall2(SYS_getcwd, @ptrToInt(buf), size); | |
| 125 | return syscall2(.getcwd, @ptrToInt(buf), size); | |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | pub fn getdents(fd: i32, dirp: [*]u8, len: usize) usize { |
| 129 | 129 | return syscall3( |
| 130 | SYS_getdents, | |
| 130 | .getdents, | |
| 131 | 131 | @bitCast(usize, @as(isize, fd)), |
| 132 | 132 | @ptrToInt(dirp), |
| 133 | 133 | std.math.min(len, maxInt(c_int)), |
| ... | ... | @@ -136,7 +136,7 @@ pub fn getdents(fd: i32, dirp: [*]u8, len: usize) usize { |
| 136 | 136 | |
| 137 | 137 | pub fn getdents64(fd: i32, dirp: [*]u8, len: usize) usize { |
| 138 | 138 | return syscall3( |
| 139 | SYS_getdents64, | |
| 139 | .getdents64, | |
| 140 | 140 | @bitCast(usize, @as(isize, fd)), |
| 141 | 141 | @ptrToInt(dirp), |
| 142 | 142 | std.math.min(len, maxInt(c_int)), |
| ... | ... | @@ -144,61 +144,61 @@ pub fn getdents64(fd: i32, dirp: [*]u8, len: usize) usize { |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | pub fn inotify_init1(flags: u32) usize { |
| 147 | return syscall1(SYS_inotify_init1, flags); | |
| 147 | return syscall1(.inotify_init1, flags); | |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | pub fn inotify_add_watch(fd: i32, pathname: [*:0]const u8, mask: u32) usize { |
| 151 | return syscall3(SYS_inotify_add_watch, @bitCast(usize, @as(isize, fd)), @ptrToInt(pathname), mask); | |
| 151 | return syscall3(.inotify_add_watch, @bitCast(usize, @as(isize, fd)), @ptrToInt(pathname), mask); | |
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | pub fn inotify_rm_watch(fd: i32, wd: i32) usize { |
| 155 | return syscall2(SYS_inotify_rm_watch, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, wd))); | |
| 155 | return syscall2(.inotify_rm_watch, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, wd))); | |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | pub fn readlink(noalias path: [*:0]const u8, noalias buf_ptr: [*]u8, buf_len: usize) usize { |
| 159 | if (@hasDecl(@This(), "SYS_readlink")) { | |
| 160 | return syscall3(SYS_readlink, @ptrToInt(path), @ptrToInt(buf_ptr), buf_len); | |
| 159 | if (@hasField(SYS, "readlink")) { | |
| 160 | return syscall3(.readlink, @ptrToInt(path), @ptrToInt(buf_ptr), buf_len); | |
| 161 | 161 | } else { |
| 162 | return syscall4(SYS_readlinkat, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(path), @ptrToInt(buf_ptr), buf_len); | |
| 162 | return syscall4(.readlinkat, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(path), @ptrToInt(buf_ptr), buf_len); | |
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | pub fn readlinkat(dirfd: i32, noalias path: [*:0]const u8, noalias buf_ptr: [*]u8, buf_len: usize) usize { |
| 167 | return syscall4(SYS_readlinkat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), @ptrToInt(buf_ptr), buf_len); | |
| 167 | return syscall4(.readlinkat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), @ptrToInt(buf_ptr), buf_len); | |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | pub fn mkdir(path: [*:0]const u8, mode: u32) usize { |
| 171 | if (@hasDecl(@This(), "SYS_mkdir")) { | |
| 172 | return syscall2(SYS_mkdir, @ptrToInt(path), mode); | |
| 171 | if (@hasField(SYS, "mkdir")) { | |
| 172 | return syscall2(.mkdir, @ptrToInt(path), mode); | |
| 173 | 173 | } else { |
| 174 | return syscall3(SYS_mkdirat, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(path), mode); | |
| 174 | return syscall3(.mkdirat, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(path), mode); | |
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | pub fn mkdirat(dirfd: i32, path: [*:0]const u8, mode: u32) usize { |
| 179 | return syscall3(SYS_mkdirat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), mode); | |
| 179 | return syscall3(.mkdirat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), mode); | |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | pub fn mount(special: [*:0]const u8, dir: [*:0]const u8, fstype: [*:0]const u8, flags: u32, data: usize) usize { |
| 183 | return syscall5(SYS_mount, @ptrToInt(special), @ptrToInt(dir), @ptrToInt(fstype), flags, data); | |
| 183 | return syscall5(.mount, @ptrToInt(special), @ptrToInt(dir), @ptrToInt(fstype), flags, data); | |
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | pub fn umount(special: [*:0]const u8) usize { |
| 187 | return syscall2(SYS_umount2, @ptrToInt(special), 0); | |
| 187 | return syscall2(.umount2, @ptrToInt(special), 0); | |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | pub fn umount2(special: [*:0]const u8, flags: u32) usize { |
| 191 | return syscall2(SYS_umount2, @ptrToInt(special), flags); | |
| 191 | return syscall2(.umount2, @ptrToInt(special), flags); | |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | pub fn mmap(address: ?[*]u8, length: usize, prot: usize, flags: u32, fd: i32, offset: u64) usize { |
| 195 | if (@hasDecl(@This(), "SYS_mmap2")) { | |
| 195 | if (@hasField(SYS, "mmap2")) { | |
| 196 | 196 | // Make sure the offset is also specified in multiples of page size |
| 197 | 197 | if ((offset & (MMAP2_UNIT - 1)) != 0) |
| 198 | 198 | return @bitCast(usize, @as(isize, -EINVAL)); |
| 199 | 199 | |
| 200 | 200 | return syscall6( |
| 201 | SYS_mmap2, | |
| 201 | .mmap2, | |
| 202 | 202 | @ptrToInt(address), |
| 203 | 203 | length, |
| 204 | 204 | prot, |
| ... | ... | @@ -208,7 +208,7 @@ pub fn mmap(address: ?[*]u8, length: usize, prot: usize, flags: u32, fd: i32, of |
| 208 | 208 | ); |
| 209 | 209 | } else { |
| 210 | 210 | return syscall6( |
| 211 | SYS_mmap, | |
| 211 | .mmap, | |
| 212 | 212 | @ptrToInt(address), |
| 213 | 213 | length, |
| 214 | 214 | prot, |
| ... | ... | @@ -220,19 +220,19 @@ pub fn mmap(address: ?[*]u8, length: usize, prot: usize, flags: u32, fd: i32, of |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | pub fn mprotect(address: [*]const u8, length: usize, protection: usize) usize { |
| 223 | return syscall3(SYS_mprotect, @ptrToInt(address), length, protection); | |
| 223 | return syscall3(.mprotect, @ptrToInt(address), length, protection); | |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | pub fn munmap(address: [*]const u8, length: usize) usize { |
| 227 | return syscall2(SYS_munmap, @ptrToInt(address), length); | |
| 227 | return syscall2(.munmap, @ptrToInt(address), length); | |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | pub fn poll(fds: [*]pollfd, n: nfds_t, timeout: i32) usize { |
| 231 | if (@hasDecl(@This(), "SYS_poll")) { | |
| 232 | return syscall3(SYS_poll, @ptrToInt(fds), n, @bitCast(u32, timeout)); | |
| 231 | if (@hasField(SYS, "poll")) { | |
| 232 | return syscall3(.poll, @ptrToInt(fds), n, @bitCast(u32, timeout)); | |
| 233 | 233 | } else { |
| 234 | 234 | return syscall6( |
| 235 | SYS_ppoll, | |
| 235 | .ppoll, | |
| 236 | 236 | @ptrToInt(fds), |
| 237 | 237 | n, |
| 238 | 238 | @ptrToInt(if (timeout >= 0) |
| ... | ... | @@ -250,12 +250,12 @@ pub fn poll(fds: [*]pollfd, n: nfds_t, timeout: i32) usize { |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | pub fn read(fd: i32, buf: [*]u8, count: usize) usize { |
| 253 | return syscall3(SYS_read, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), count); | |
| 253 | return syscall3(.read, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), count); | |
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | pub fn preadv(fd: i32, iov: [*]const iovec, count: usize, offset: u64) usize { |
| 257 | 257 | return syscall5( |
| 258 | SYS_preadv, | |
| 258 | .preadv, | |
| 259 | 259 | @bitCast(usize, @as(isize, fd)), |
| 260 | 260 | @ptrToInt(iov), |
| 261 | 261 | count, |
| ... | ... | @@ -266,7 +266,7 @@ pub fn preadv(fd: i32, iov: [*]const iovec, count: usize, offset: u64) usize { |
| 266 | 266 | |
| 267 | 267 | pub fn preadv2(fd: i32, iov: [*]const iovec, count: usize, offset: u64, flags: kernel_rwf) usize { |
| 268 | 268 | return syscall6( |
| 269 | SYS_preadv2, | |
| 269 | .preadv2, | |
| 270 | 270 | @bitCast(usize, @as(isize, fd)), |
| 271 | 271 | @ptrToInt(iov), |
| 272 | 272 | count, |
| ... | ... | @@ -277,16 +277,16 @@ pub fn preadv2(fd: i32, iov: [*]const iovec, count: usize, offset: u64, flags: k |
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | pub fn readv(fd: i32, iov: [*]const iovec, count: usize) usize { |
| 280 | return syscall3(SYS_readv, @bitCast(usize, @as(isize, fd)), @ptrToInt(iov), count); | |
| 280 | return syscall3(.readv, @bitCast(usize, @as(isize, fd)), @ptrToInt(iov), count); | |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | pub fn writev(fd: i32, iov: [*]const iovec_const, count: usize) usize { |
| 284 | return syscall3(SYS_writev, @bitCast(usize, @as(isize, fd)), @ptrToInt(iov), count); | |
| 284 | return syscall3(.writev, @bitCast(usize, @as(isize, fd)), @ptrToInt(iov), count); | |
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | pub fn pwritev(fd: i32, iov: [*]const iovec_const, count: usize, offset: u64) usize { |
| 288 | 288 | return syscall5( |
| 289 | SYS_pwritev, | |
| 289 | .pwritev, | |
| 290 | 290 | @bitCast(usize, @as(isize, fd)), |
| 291 | 291 | @ptrToInt(iov), |
| 292 | 292 | count, |
| ... | ... | @@ -297,7 +297,7 @@ pub fn pwritev(fd: i32, iov: [*]const iovec_const, count: usize, offset: u64) us |
| 297 | 297 | |
| 298 | 298 | pub fn pwritev2(fd: i32, iov: [*]const iovec_const, count: usize, offset: u64, flags: kernel_rwf) usize { |
| 299 | 299 | return syscall6( |
| 300 | SYS_pwritev2, | |
| 300 | .pwritev2, | |
| 301 | 301 | @bitCast(usize, @as(isize, fd)), |
| 302 | 302 | @ptrToInt(iov), |
| 303 | 303 | count, |
| ... | ... | @@ -308,30 +308,30 @@ pub fn pwritev2(fd: i32, iov: [*]const iovec_const, count: usize, offset: u64, f |
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | pub fn rmdir(path: [*:0]const u8) usize { |
| 311 | if (@hasDecl(@This(), "SYS_rmdir")) { | |
| 312 | return syscall1(SYS_rmdir, @ptrToInt(path)); | |
| 311 | if (@hasField(SYS, "rmdir")) { | |
| 312 | return syscall1(.rmdir, @ptrToInt(path)); | |
| 313 | 313 | } else { |
| 314 | return syscall3(SYS_unlinkat, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(path), AT_REMOVEDIR); | |
| 314 | return syscall3(.unlinkat, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(path), AT_REMOVEDIR); | |
| 315 | 315 | } |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | pub fn symlink(existing: [*:0]const u8, new: [*:0]const u8) usize { |
| 319 | if (@hasDecl(@This(), "SYS_symlink")) { | |
| 320 | return syscall2(SYS_symlink, @ptrToInt(existing), @ptrToInt(new)); | |
| 319 | if (@hasField(SYS, "symlink")) { | |
| 320 | return syscall2(.symlink, @ptrToInt(existing), @ptrToInt(new)); | |
| 321 | 321 | } else { |
| 322 | return syscall3(SYS_symlinkat, @ptrToInt(existing), @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(new)); | |
| 322 | return syscall3(.symlinkat, @ptrToInt(existing), @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(new)); | |
| 323 | 323 | } |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | pub fn symlinkat(existing: [*:0]const u8, newfd: i32, newpath: [*:0]const u8) usize { |
| 327 | return syscall3(SYS_symlinkat, @ptrToInt(existing), @bitCast(usize, @as(isize, newfd)), @ptrToInt(newpath)); | |
| 327 | return syscall3(.symlinkat, @ptrToInt(existing), @bitCast(usize, @as(isize, newfd)), @ptrToInt(newpath)); | |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | 330 | pub fn pread(fd: i32, buf: [*]u8, count: usize, offset: u64) usize { |
| 331 | if (@hasDecl(@This(), "SYS_pread64")) { | |
| 331 | if (@hasField(SYS, "pread64")) { | |
| 332 | 332 | if (require_aligned_register_pair) { |
| 333 | 333 | return syscall6( |
| 334 | SYS_pread64, | |
| 334 | .pread64, | |
| 335 | 335 | @bitCast(usize, @as(isize, fd)), |
| 336 | 336 | @ptrToInt(buf), |
| 337 | 337 | count, |
| ... | ... | @@ -341,7 +341,7 @@ pub fn pread(fd: i32, buf: [*]u8, count: usize, offset: u64) usize { |
| 341 | 341 | ); |
| 342 | 342 | } else { |
| 343 | 343 | return syscall5( |
| 344 | SYS_pread64, | |
| 344 | .pread64, | |
| 345 | 345 | @bitCast(usize, @as(isize, fd)), |
| 346 | 346 | @ptrToInt(buf), |
| 347 | 347 | count, |
| ... | ... | @@ -351,7 +351,7 @@ pub fn pread(fd: i32, buf: [*]u8, count: usize, offset: u64) usize { |
| 351 | 351 | } |
| 352 | 352 | } else { |
| 353 | 353 | return syscall4( |
| 354 | SYS_pread, | |
| 354 | .pread, | |
| 355 | 355 | @bitCast(usize, @as(isize, fd)), |
| 356 | 356 | @ptrToInt(buf), |
| 357 | 357 | count, |
| ... | ... | @@ -361,40 +361,40 @@ pub fn pread(fd: i32, buf: [*]u8, count: usize, offset: u64) usize { |
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | pub fn access(path: [*:0]const u8, mode: u32) usize { |
| 364 | if (@hasDecl(@This(), "SYS_access")) { | |
| 365 | return syscall2(SYS_access, @ptrToInt(path), mode); | |
| 364 | if (@hasField(SYS, "access")) { | |
| 365 | return syscall2(.access, @ptrToInt(path), mode); | |
| 366 | 366 | } else { |
| 367 | return syscall4(SYS_faccessat, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(path), mode, 0); | |
| 367 | return syscall4(.faccessat, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(path), mode, 0); | |
| 368 | 368 | } |
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | pub fn faccessat(dirfd: i32, path: [*:0]const u8, mode: u32, flags: u32) usize { |
| 372 | return syscall4(SYS_faccessat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), mode, flags); | |
| 372 | return syscall4(.faccessat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), mode, flags); | |
| 373 | 373 | } |
| 374 | 374 | |
| 375 | 375 | pub fn pipe(fd: *[2]i32) usize { |
| 376 | 376 | if (comptime builtin.arch.isMIPS()) { |
| 377 | 377 | return syscall_pipe(fd); |
| 378 | } else if (@hasDecl(@This(), "SYS_pipe")) { | |
| 379 | return syscall1(SYS_pipe, @ptrToInt(fd)); | |
| 378 | } else if (@hasField(SYS, "pipe")) { | |
| 379 | return syscall1(.pipe, @ptrToInt(fd)); | |
| 380 | 380 | } else { |
| 381 | return syscall2(SYS_pipe2, @ptrToInt(fd), 0); | |
| 381 | return syscall2(.pipe2, @ptrToInt(fd), 0); | |
| 382 | 382 | } |
| 383 | 383 | } |
| 384 | 384 | |
| 385 | 385 | pub fn pipe2(fd: *[2]i32, flags: u32) usize { |
| 386 | return syscall2(SYS_pipe2, @ptrToInt(fd), flags); | |
| 386 | return syscall2(.pipe2, @ptrToInt(fd), flags); | |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | pub fn write(fd: i32, buf: [*]const u8, count: usize) usize { |
| 390 | return syscall3(SYS_write, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), count); | |
| 390 | return syscall3(.write, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), count); | |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | 393 | pub fn ftruncate(fd: i32, length: u64) usize { |
| 394 | if (@hasDecl(@This(), "SYS_ftruncate64")) { | |
| 394 | if (@hasField(SYS, "ftruncate64")) { | |
| 395 | 395 | if (require_aligned_register_pair) { |
| 396 | 396 | return syscall4( |
| 397 | SYS_ftruncate64, | |
| 397 | .ftruncate64, | |
| 398 | 398 | @bitCast(usize, @as(isize, fd)), |
| 399 | 399 | 0, |
| 400 | 400 | @truncate(usize, length), |
| ... | ... | @@ -402,7 +402,7 @@ pub fn ftruncate(fd: i32, length: u64) usize { |
| 402 | 402 | ); |
| 403 | 403 | } else { |
| 404 | 404 | return syscall3( |
| 405 | SYS_ftruncate64, | |
| 405 | .ftruncate64, | |
| 406 | 406 | @bitCast(usize, @as(isize, fd)), |
| 407 | 407 | @truncate(usize, length), |
| 408 | 408 | @truncate(usize, length >> 32), |
| ... | ... | @@ -410,7 +410,7 @@ pub fn ftruncate(fd: i32, length: u64) usize { |
| 410 | 410 | } |
| 411 | 411 | } else { |
| 412 | 412 | return syscall2( |
| 413 | SYS_ftruncate, | |
| 413 | .ftruncate, | |
| 414 | 414 | @bitCast(usize, @as(isize, fd)), |
| 415 | 415 | @truncate(usize, length), |
| 416 | 416 | ); |
| ... | ... | @@ -418,10 +418,10 @@ pub fn ftruncate(fd: i32, length: u64) usize { |
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | pub fn pwrite(fd: i32, buf: [*]const u8, count: usize, offset: usize) usize { |
| 421 | if (@hasDecl(@This(), "SYS_pwrite64")) { | |
| 421 | if (@hasField(SYS, "pwrite64")) { | |
| 422 | 422 | if (require_aligned_register_pair) { |
| 423 | 423 | return syscall6( |
| 424 | SYS_pwrite64, | |
| 424 | .pwrite64, | |
| 425 | 425 | @bitCast(usize, @as(isize, fd)), |
| 426 | 426 | @ptrToInt(buf), |
| 427 | 427 | count, |
| ... | ... | @@ -431,7 +431,7 @@ pub fn pwrite(fd: i32, buf: [*]const u8, count: usize, offset: usize) usize { |
| 431 | 431 | ); |
| 432 | 432 | } else { |
| 433 | 433 | return syscall5( |
| 434 | SYS_pwrite64, | |
| 434 | .pwrite64, | |
| 435 | 435 | @bitCast(usize, @as(isize, fd)), |
| 436 | 436 | @ptrToInt(buf), |
| 437 | 437 | count, |
| ... | ... | @@ -441,7 +441,7 @@ pub fn pwrite(fd: i32, buf: [*]const u8, count: usize, offset: usize) usize { |
| 441 | 441 | } |
| 442 | 442 | } else { |
| 443 | 443 | return syscall4( |
| 444 | SYS_pwrite, | |
| 444 | .pwrite, | |
| 445 | 445 | @bitCast(usize, @as(isize, fd)), |
| 446 | 446 | @ptrToInt(buf), |
| 447 | 447 | count, |
| ... | ... | @@ -451,19 +451,19 @@ pub fn pwrite(fd: i32, buf: [*]const u8, count: usize, offset: usize) usize { |
| 451 | 451 | } |
| 452 | 452 | |
| 453 | 453 | pub fn rename(old: [*:0]const u8, new: [*:0]const u8) usize { |
| 454 | if (@hasDecl(@This(), "SYS_rename")) { | |
| 455 | return syscall2(SYS_rename, @ptrToInt(old), @ptrToInt(new)); | |
| 456 | } else if (@hasDecl(@This(), "SYS_renameat")) { | |
| 457 | return syscall4(SYS_renameat, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(old), @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(new)); | |
| 454 | if (@hasField(SYS, "rename")) { | |
| 455 | return syscall2(.rename, @ptrToInt(old), @ptrToInt(new)); | |
| 456 | } else if (@hasField(SYS, "renameat")) { | |
| 457 | return syscall4(.renameat, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(old), @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(new)); | |
| 458 | 458 | } else { |
| 459 | return syscall5(SYS_renameat2, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(old), @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(new), 0); | |
| 459 | return syscall5(.renameat2, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(old), @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(new), 0); | |
| 460 | 460 | } |
| 461 | 461 | } |
| 462 | 462 | |
| 463 | 463 | pub fn renameat(oldfd: i32, oldpath: [*]const u8, newfd: i32, newpath: [*]const u8) usize { |
| 464 | if (@hasDecl(@This(), "SYS_renameat")) { | |
| 464 | if (@hasField(SYS, "renameat")) { | |
| 465 | 465 | return syscall4( |
| 466 | SYS_renameat, | |
| 466 | .renameat, | |
| 467 | 467 | @bitCast(usize, @as(isize, oldfd)), |
| 468 | 468 | @ptrToInt(oldpath), |
| 469 | 469 | @bitCast(usize, @as(isize, newfd)), |
| ... | ... | @@ -471,7 +471,7 @@ pub fn renameat(oldfd: i32, oldpath: [*]const u8, newfd: i32, newpath: [*]const |
| 471 | 471 | ); |
| 472 | 472 | } else { |
| 473 | 473 | return syscall5( |
| 474 | SYS_renameat2, | |
| 474 | .renameat2, | |
| 475 | 475 | @bitCast(usize, @as(isize, oldfd)), |
| 476 | 476 | @ptrToInt(oldpath), |
| 477 | 477 | @bitCast(usize, @as(isize, newfd)), |
| ... | ... | @@ -483,7 +483,7 @@ pub fn renameat(oldfd: i32, oldpath: [*]const u8, newfd: i32, newpath: [*]const |
| 483 | 483 | |
| 484 | 484 | pub fn renameat2(oldfd: i32, oldpath: [*:0]const u8, newfd: i32, newpath: [*:0]const u8, flags: u32) usize { |
| 485 | 485 | return syscall5( |
| 486 | SYS_renameat2, | |
| 486 | .renameat2, | |
| 487 | 487 | @bitCast(usize, @as(isize, oldfd)), |
| 488 | 488 | @ptrToInt(oldpath), |
| 489 | 489 | @bitCast(usize, @as(isize, newfd)), |
| ... | ... | @@ -493,11 +493,11 @@ pub fn renameat2(oldfd: i32, oldpath: [*:0]const u8, newfd: i32, newpath: [*:0]c |
| 493 | 493 | } |
| 494 | 494 | |
| 495 | 495 | pub fn open(path: [*:0]const u8, flags: u32, perm: usize) usize { |
| 496 | if (@hasDecl(@This(), "SYS_open")) { | |
| 497 | return syscall3(SYS_open, @ptrToInt(path), flags, perm); | |
| 496 | if (@hasField(SYS, "open")) { | |
| 497 | return syscall3(.open, @ptrToInt(path), flags, perm); | |
| 498 | 498 | } else { |
| 499 | 499 | return syscall4( |
| 500 | SYS_openat, | |
| 500 | .openat, | |
| 501 | 501 | @bitCast(usize, @as(isize, AT_FDCWD)), |
| 502 | 502 | @ptrToInt(path), |
| 503 | 503 | flags, |
| ... | ... | @@ -507,32 +507,32 @@ pub fn open(path: [*:0]const u8, flags: u32, perm: usize) usize { |
| 507 | 507 | } |
| 508 | 508 | |
| 509 | 509 | pub fn create(path: [*:0]const u8, perm: usize) usize { |
| 510 | return syscall2(SYS_creat, @ptrToInt(path), perm); | |
| 510 | return syscall2(.creat, @ptrToInt(path), perm); | |
| 511 | 511 | } |
| 512 | 512 | |
| 513 | 513 | pub fn openat(dirfd: i32, path: [*:0]const u8, flags: u32, mode: usize) usize { |
| 514 | 514 | // dirfd could be negative, for example AT_FDCWD is -100 |
| 515 | return syscall4(SYS_openat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), flags, mode); | |
| 515 | return syscall4(.openat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), flags, mode); | |
| 516 | 516 | } |
| 517 | 517 | |
| 518 | 518 | /// See also `clone` (from the arch-specific include) |
| 519 | 519 | pub fn clone5(flags: usize, child_stack_ptr: usize, parent_tid: *i32, child_tid: *i32, newtls: usize) usize { |
| 520 | return syscall5(SYS_clone, flags, child_stack_ptr, @ptrToInt(parent_tid), @ptrToInt(child_tid), newtls); | |
| 520 | return syscall5(.clone, flags, child_stack_ptr, @ptrToInt(parent_tid), @ptrToInt(child_tid), newtls); | |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | /// See also `clone` (from the arch-specific include) |
| 524 | 524 | pub fn clone2(flags: u32, child_stack_ptr: usize) usize { |
| 525 | return syscall2(SYS_clone, flags, child_stack_ptr); | |
| 525 | return syscall2(.clone, flags, child_stack_ptr); | |
| 526 | 526 | } |
| 527 | 527 | |
| 528 | 528 | pub fn close(fd: i32) usize { |
| 529 | return syscall1(SYS_close, @bitCast(usize, @as(isize, fd))); | |
| 529 | return syscall1(.close, @bitCast(usize, @as(isize, fd))); | |
| 530 | 530 | } |
| 531 | 531 | |
| 532 | 532 | /// Can only be called on 32 bit systems. For 64 bit see `lseek`. |
| 533 | 533 | pub fn llseek(fd: i32, offset: u64, result: ?*u64, whence: usize) usize { |
| 534 | 534 | return syscall5( |
| 535 | SYS__llseek, | |
| 535 | ._llseek, | |
| 536 | 536 | @bitCast(usize, @as(isize, fd)), |
| 537 | 537 | @truncate(usize, offset >> 32), |
| 538 | 538 | @truncate(usize, offset), |
| ... | ... | @@ -543,53 +543,53 @@ pub fn llseek(fd: i32, offset: u64, result: ?*u64, whence: usize) usize { |
| 543 | 543 | |
| 544 | 544 | /// Can only be called on 64 bit systems. For 32 bit see `llseek`. |
| 545 | 545 | pub fn lseek(fd: i32, offset: i64, whence: usize) usize { |
| 546 | return syscall3(SYS_lseek, @bitCast(usize, @as(isize, fd)), @bitCast(usize, offset), whence); | |
| 546 | return syscall3(.lseek, @bitCast(usize, @as(isize, fd)), @bitCast(usize, offset), whence); | |
| 547 | 547 | } |
| 548 | 548 | |
| 549 | 549 | pub fn exit(status: i32) noreturn { |
| 550 | _ = syscall1(SYS_exit, @bitCast(usize, @as(isize, status))); | |
| 550 | _ = syscall1(.exit, @bitCast(usize, @as(isize, status))); | |
| 551 | 551 | unreachable; |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | pub fn exit_group(status: i32) noreturn { |
| 555 | _ = syscall1(SYS_exit_group, @bitCast(usize, @as(isize, status))); | |
| 555 | _ = syscall1(.exit_group, @bitCast(usize, @as(isize, status))); | |
| 556 | 556 | unreachable; |
| 557 | 557 | } |
| 558 | 558 | |
| 559 | 559 | pub fn getrandom(buf: [*]u8, count: usize, flags: u32) usize { |
| 560 | return syscall3(SYS_getrandom, @ptrToInt(buf), count, flags); | |
| 560 | return syscall3(.getrandom, @ptrToInt(buf), count, flags); | |
| 561 | 561 | } |
| 562 | 562 | |
| 563 | 563 | pub fn kill(pid: pid_t, sig: i32) usize { |
| 564 | return syscall2(SYS_kill, @bitCast(usize, @as(isize, pid)), @bitCast(usize, @as(isize, sig))); | |
| 564 | return syscall2(.kill, @bitCast(usize, @as(isize, pid)), @bitCast(usize, @as(isize, sig))); | |
| 565 | 565 | } |
| 566 | 566 | |
| 567 | 567 | pub fn tkill(tid: pid_t, sig: i32) usize { |
| 568 | return syscall2(SYS_tkill, @bitCast(usize, @as(isize, tid)), @bitCast(usize, @as(isize, sig))); | |
| 568 | return syscall2(.tkill, @bitCast(usize, @as(isize, tid)), @bitCast(usize, @as(isize, sig))); | |
| 569 | 569 | } |
| 570 | 570 | |
| 571 | 571 | pub fn tgkill(tgid: pid_t, tid: pid_t, sig: i32) usize { |
| 572 | return syscall2(SYS_tgkill, @bitCast(usize, @as(isize, tgid)), @bitCast(usize, @as(isize, tid)), @bitCast(usize, @as(isize, sig))); | |
| 572 | return syscall2(.tgkill, @bitCast(usize, @as(isize, tgid)), @bitCast(usize, @as(isize, tid)), @bitCast(usize, @as(isize, sig))); | |
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | pub fn unlink(path: [*:0]const u8) usize { |
| 576 | if (@hasDecl(@This(), "SYS_unlink")) { | |
| 577 | return syscall1(SYS_unlink, @ptrToInt(path)); | |
| 576 | if (@hasField(SYS, "unlink")) { | |
| 577 | return syscall1(.unlink, @ptrToInt(path)); | |
| 578 | 578 | } else { |
| 579 | return syscall3(SYS_unlinkat, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(path), 0); | |
| 579 | return syscall3(.unlinkat, @bitCast(usize, @as(isize, AT_FDCWD)), @ptrToInt(path), 0); | |
| 580 | 580 | } |
| 581 | 581 | } |
| 582 | 582 | |
| 583 | 583 | pub fn unlinkat(dirfd: i32, path: [*:0]const u8, flags: u32) usize { |
| 584 | return syscall3(SYS_unlinkat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), flags); | |
| 584 | return syscall3(.unlinkat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), flags); | |
| 585 | 585 | } |
| 586 | 586 | |
| 587 | 587 | pub fn waitpid(pid: pid_t, status: *u32, flags: u32) usize { |
| 588 | return syscall4(SYS_wait4, @bitCast(usize, @as(isize, pid)), @ptrToInt(status), flags, 0); | |
| 588 | return syscall4(.wait4, @bitCast(usize, @as(isize, pid)), @ptrToInt(status), flags, 0); | |
| 589 | 589 | } |
| 590 | 590 | |
| 591 | 591 | pub fn fcntl(fd: fd_t, cmd: i32, arg: usize) usize { |
| 592 | return syscall3(SYS_fcntl, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, cmd)), arg); | |
| 592 | return syscall3(.fcntl, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, cmd)), arg); | |
| 593 | 593 | } |
| 594 | 594 | |
| 595 | 595 | var vdso_clock_gettime = @ptrCast(?*const c_void, init_vdso_clock_gettime); |
| ... | ... | @@ -609,7 +609,7 @@ pub fn clock_gettime(clk_id: i32, tp: *timespec) usize { |
| 609 | 609 | } |
| 610 | 610 | } |
| 611 | 611 | } |
| 612 | return syscall2(SYS_clock_gettime, @bitCast(usize, @as(isize, clk_id)), @ptrToInt(tp)); | |
| 612 | return syscall2(.clock_gettime, @bitCast(usize, @as(isize, clk_id)), @ptrToInt(tp)); | |
| 613 | 613 | } |
| 614 | 614 | |
| 615 | 615 | fn init_vdso_clock_gettime(clk: i32, ts: *timespec) callconv(.C) usize { |
| ... | ... | @@ -626,86 +626,86 @@ fn init_vdso_clock_gettime(clk: i32, ts: *timespec) callconv(.C) usize { |
| 626 | 626 | } |
| 627 | 627 | |
| 628 | 628 | pub fn clock_getres(clk_id: i32, tp: *timespec) usize { |
| 629 | return syscall2(SYS_clock_getres, @bitCast(usize, @as(isize, clk_id)), @ptrToInt(tp)); | |
| 629 | return syscall2(.clock_getres, @bitCast(usize, @as(isize, clk_id)), @ptrToInt(tp)); | |
| 630 | 630 | } |
| 631 | 631 | |
| 632 | 632 | pub fn clock_settime(clk_id: i32, tp: *const timespec) usize { |
| 633 | return syscall2(SYS_clock_settime, @bitCast(usize, @as(isize, clk_id)), @ptrToInt(tp)); | |
| 633 | return syscall2(.clock_settime, @bitCast(usize, @as(isize, clk_id)), @ptrToInt(tp)); | |
| 634 | 634 | } |
| 635 | 635 | |
| 636 | 636 | pub fn gettimeofday(tv: *timeval, tz: *timezone) usize { |
| 637 | return syscall2(SYS_gettimeofday, @ptrToInt(tv), @ptrToInt(tz)); | |
| 637 | return syscall2(.gettimeofday, @ptrToInt(tv), @ptrToInt(tz)); | |
| 638 | 638 | } |
| 639 | 639 | |
| 640 | 640 | pub fn settimeofday(tv: *const timeval, tz: *const timezone) usize { |
| 641 | return syscall2(SYS_settimeofday, @ptrToInt(tv), @ptrToInt(tz)); | |
| 641 | return syscall2(.settimeofday, @ptrToInt(tv), @ptrToInt(tz)); | |
| 642 | 642 | } |
| 643 | 643 | |
| 644 | 644 | pub fn nanosleep(req: *const timespec, rem: ?*timespec) usize { |
| 645 | return syscall2(SYS_nanosleep, @ptrToInt(req), @ptrToInt(rem)); | |
| 645 | return syscall2(.nanosleep, @ptrToInt(req), @ptrToInt(rem)); | |
| 646 | 646 | } |
| 647 | 647 | |
| 648 | 648 | pub fn setuid(uid: u32) usize { |
| 649 | if (@hasDecl(@This(), "SYS_setuid32")) { | |
| 650 | return syscall1(SYS_setuid32, uid); | |
| 649 | if (@hasField(SYS, "setuid32")) { | |
| 650 | return syscall1(.setuid32, uid); | |
| 651 | 651 | } else { |
| 652 | return syscall1(SYS_setuid, uid); | |
| 652 | return syscall1(.setuid, uid); | |
| 653 | 653 | } |
| 654 | 654 | } |
| 655 | 655 | |
| 656 | 656 | pub fn setgid(gid: u32) usize { |
| 657 | if (@hasDecl(@This(), "SYS_setgid32")) { | |
| 658 | return syscall1(SYS_setgid32, gid); | |
| 657 | if (@hasField(SYS, "setgid32")) { | |
| 658 | return syscall1(.setgid32, gid); | |
| 659 | 659 | } else { |
| 660 | return syscall1(SYS_setgid, gid); | |
| 660 | return syscall1(.setgid, gid); | |
| 661 | 661 | } |
| 662 | 662 | } |
| 663 | 663 | |
| 664 | 664 | pub fn setreuid(ruid: u32, euid: u32) usize { |
| 665 | if (@hasDecl(@This(), "SYS_setreuid32")) { | |
| 666 | return syscall2(SYS_setreuid32, ruid, euid); | |
| 665 | if (@hasField(SYS, "setreuid32")) { | |
| 666 | return syscall2(.setreuid32, ruid, euid); | |
| 667 | 667 | } else { |
| 668 | return syscall2(SYS_setreuid, ruid, euid); | |
| 668 | return syscall2(.setreuid, ruid, euid); | |
| 669 | 669 | } |
| 670 | 670 | } |
| 671 | 671 | |
| 672 | 672 | pub fn setregid(rgid: u32, egid: u32) usize { |
| 673 | if (@hasDecl(@This(), "SYS_setregid32")) { | |
| 674 | return syscall2(SYS_setregid32, rgid, egid); | |
| 673 | if (@hasField(SYS, "setregid32")) { | |
| 674 | return syscall2(.setregid32, rgid, egid); | |
| 675 | 675 | } else { |
| 676 | return syscall2(SYS_setregid, rgid, egid); | |
| 676 | return syscall2(.setregid, rgid, egid); | |
| 677 | 677 | } |
| 678 | 678 | } |
| 679 | 679 | |
| 680 | 680 | pub fn getuid() u32 { |
| 681 | if (@hasDecl(@This(), "SYS_getuid32")) { | |
| 682 | return @as(u32, syscall0(SYS_getuid32)); | |
| 681 | if (@hasField(SYS, "getuid32")) { | |
| 682 | return @as(u32, syscall0(.getuid32)); | |
| 683 | 683 | } else { |
| 684 | return @as(u32, syscall0(SYS_getuid)); | |
| 684 | return @as(u32, syscall0(.getuid)); | |
| 685 | 685 | } |
| 686 | 686 | } |
| 687 | 687 | |
| 688 | 688 | pub fn getgid() u32 { |
| 689 | if (@hasDecl(@This(), "SYS_getgid32")) { | |
| 690 | return @as(u32, syscall0(SYS_getgid32)); | |
| 689 | if (@hasField(SYS, "getgid32")) { | |
| 690 | return @as(u32, syscall0(.getgid32)); | |
| 691 | 691 | } else { |
| 692 | return @as(u32, syscall0(SYS_getgid)); | |
| 692 | return @as(u32, syscall0(.getgid)); | |
| 693 | 693 | } |
| 694 | 694 | } |
| 695 | 695 | |
| 696 | 696 | pub fn geteuid() u32 { |
| 697 | if (@hasDecl(@This(), "SYS_geteuid32")) { | |
| 698 | return @as(u32, syscall0(SYS_geteuid32)); | |
| 697 | if (@hasField(SYS, "geteuid32")) { | |
| 698 | return @as(u32, syscall0(.geteuid32)); | |
| 699 | 699 | } else { |
| 700 | return @as(u32, syscall0(SYS_geteuid)); | |
| 700 | return @as(u32, syscall0(.geteuid)); | |
| 701 | 701 | } |
| 702 | 702 | } |
| 703 | 703 | |
| 704 | 704 | pub fn getegid() u32 { |
| 705 | if (@hasDecl(@This(), "SYS_getegid32")) { | |
| 706 | return @as(u32, syscall0(SYS_getegid32)); | |
| 705 | if (@hasField(SYS, "getegid32")) { | |
| 706 | return @as(u32, syscall0(.getegid32)); | |
| 707 | 707 | } else { |
| 708 | return @as(u32, syscall0(SYS_getegid)); | |
| 708 | return @as(u32, syscall0(.getegid)); | |
| 709 | 709 | } |
| 710 | 710 | } |
| 711 | 711 | |
| ... | ... | @@ -718,63 +718,63 @@ pub fn setegid(egid: u32) usize { |
| 718 | 718 | } |
| 719 | 719 | |
| 720 | 720 | pub fn getresuid(ruid: *u32, euid: *u32, suid: *u32) usize { |
| 721 | if (@hasDecl(@This(), "SYS_getresuid32")) { | |
| 722 | return syscall3(SYS_getresuid32, @ptrToInt(ruid), @ptrToInt(euid), @ptrToInt(suid)); | |
| 721 | if (@hasField(SYS, "getresuid32")) { | |
| 722 | return syscall3(.getresuid32, @ptrToInt(ruid), @ptrToInt(euid), @ptrToInt(suid)); | |
| 723 | 723 | } else { |
| 724 | return syscall3(SYS_getresuid, @ptrToInt(ruid), @ptrToInt(euid), @ptrToInt(suid)); | |
| 724 | return syscall3(.getresuid, @ptrToInt(ruid), @ptrToInt(euid), @ptrToInt(suid)); | |
| 725 | 725 | } |
| 726 | 726 | } |
| 727 | 727 | |
| 728 | 728 | pub fn getresgid(rgid: *u32, egid: *u32, sgid: *u32) usize { |
| 729 | if (@hasDecl(@This(), "SYS_getresgid32")) { | |
| 730 | return syscall3(SYS_getresgid32, @ptrToInt(rgid), @ptrToInt(egid), @ptrToInt(sgid)); | |
| 729 | if (@hasField(SYS, "getresgid32")) { | |
| 730 | return syscall3(.getresgid32, @ptrToInt(rgid), @ptrToInt(egid), @ptrToInt(sgid)); | |
| 731 | 731 | } else { |
| 732 | return syscall3(SYS_getresgid, @ptrToInt(rgid), @ptrToInt(egid), @ptrToInt(sgid)); | |
| 732 | return syscall3(.getresgid, @ptrToInt(rgid), @ptrToInt(egid), @ptrToInt(sgid)); | |
| 733 | 733 | } |
| 734 | 734 | } |
| 735 | 735 | |
| 736 | 736 | pub fn setresuid(ruid: u32, euid: u32, suid: u32) usize { |
| 737 | if (@hasDecl(@This(), "SYS_setresuid32")) { | |
| 738 | return syscall3(SYS_setresuid32, ruid, euid, suid); | |
| 737 | if (@hasField(SYS, "setresuid32")) { | |
| 738 | return syscall3(.setresuid32, ruid, euid, suid); | |
| 739 | 739 | } else { |
| 740 | return syscall3(SYS_setresuid, ruid, euid, suid); | |
| 740 | return syscall3(.setresuid, ruid, euid, suid); | |
| 741 | 741 | } |
| 742 | 742 | } |
| 743 | 743 | |
| 744 | 744 | pub fn setresgid(rgid: u32, egid: u32, sgid: u32) usize { |
| 745 | if (@hasDecl(@This(), "SYS_setresgid32")) { | |
| 746 | return syscall3(SYS_setresgid32, rgid, egid, sgid); | |
| 745 | if (@hasField(SYS, "setresgid32")) { | |
| 746 | return syscall3(.setresgid32, rgid, egid, sgid); | |
| 747 | 747 | } else { |
| 748 | return syscall3(SYS_setresgid, rgid, egid, sgid); | |
| 748 | return syscall3(.setresgid, rgid, egid, sgid); | |
| 749 | 749 | } |
| 750 | 750 | } |
| 751 | 751 | |
| 752 | 752 | pub fn getgroups(size: usize, list: *u32) usize { |
| 753 | if (@hasDecl(@This(), "SYS_getgroups32")) { | |
| 754 | return syscall2(SYS_getgroups32, size, @ptrToInt(list)); | |
| 753 | if (@hasField(SYS, "getgroups32")) { | |
| 754 | return syscall2(.getgroups32, size, @ptrToInt(list)); | |
| 755 | 755 | } else { |
| 756 | return syscall2(SYS_getgroups, size, @ptrToInt(list)); | |
| 756 | return syscall2(.getgroups, size, @ptrToInt(list)); | |
| 757 | 757 | } |
| 758 | 758 | } |
| 759 | 759 | |
| 760 | 760 | pub fn setgroups(size: usize, list: *const u32) usize { |
| 761 | if (@hasDecl(@This(), "SYS_setgroups32")) { | |
| 762 | return syscall2(SYS_setgroups32, size, @ptrToInt(list)); | |
| 761 | if (@hasField(SYS, "setgroups32")) { | |
| 762 | return syscall2(.setgroups32, size, @ptrToInt(list)); | |
| 763 | 763 | } else { |
| 764 | return syscall2(SYS_setgroups, size, @ptrToInt(list)); | |
| 764 | return syscall2(.setgroups, size, @ptrToInt(list)); | |
| 765 | 765 | } |
| 766 | 766 | } |
| 767 | 767 | |
| 768 | 768 | pub fn getpid() pid_t { |
| 769 | return @bitCast(pid_t, @truncate(u32, syscall0(SYS_getpid))); | |
| 769 | return @bitCast(pid_t, @truncate(u32, syscall0(.getpid))); | |
| 770 | 770 | } |
| 771 | 771 | |
| 772 | 772 | pub fn gettid() pid_t { |
| 773 | return @bitCast(pid_t, @truncate(u32, syscall0(SYS_gettid))); | |
| 773 | return @bitCast(pid_t, @truncate(u32, syscall0(.gettid))); | |
| 774 | 774 | } |
| 775 | 775 | |
| 776 | 776 | pub fn sigprocmask(flags: u32, noalias set: ?*const sigset_t, noalias oldset: ?*sigset_t) usize { |
| 777 | return syscall4(SYS_rt_sigprocmask, flags, @ptrToInt(set), @ptrToInt(oldset), NSIG / 8); | |
| 777 | return syscall4(.rt_sigprocmask, flags, @ptrToInt(set), @ptrToInt(oldset), NSIG / 8); | |
| 778 | 778 | } |
| 779 | 779 | |
| 780 | 780 | pub fn sigaction(sig: u6, noalias act: *const Sigaction, noalias oact: ?*Sigaction) usize { |
| ... | ... | @@ -792,7 +792,7 @@ pub fn sigaction(sig: u6, noalias act: *const Sigaction, noalias oact: ?*Sigacti |
| 792 | 792 | var ksa_old: k_sigaction = undefined; |
| 793 | 793 | const ksa_mask_size = @sizeOf(@TypeOf(ksa_old.mask)); |
| 794 | 794 | @memcpy(@ptrCast([*]u8, &ksa.mask), @ptrCast([*]const u8, &act.mask), ksa_mask_size); |
| 795 | const result = syscall4(SYS_rt_sigaction, sig, @ptrToInt(&ksa), @ptrToInt(&ksa_old), ksa_mask_size); | |
| 795 | const result = syscall4(.rt_sigaction, sig, @ptrToInt(&ksa), @ptrToInt(&ksa_old), ksa_mask_size); | |
| 796 | 796 | const err = getErrno(result); |
| 797 | 797 | if (err != 0) { |
| 798 | 798 | return result; |
| ... | ... | @@ -819,42 +819,42 @@ pub fn getsockname(fd: i32, noalias addr: *sockaddr, noalias len: *socklen_t) us |
| 819 | 819 | if (builtin.arch == .i386) { |
| 820 | 820 | return socketcall(SC_getsockname, &[3]usize{ @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), @ptrToInt(len) }); |
| 821 | 821 | } |
| 822 | return syscall3(SYS_getsockname, @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), @ptrToInt(len)); | |
| 822 | return syscall3(.getsockname, @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), @ptrToInt(len)); | |
| 823 | 823 | } |
| 824 | 824 | |
| 825 | 825 | pub fn getpeername(fd: i32, noalias addr: *sockaddr, noalias len: *socklen_t) usize { |
| 826 | 826 | if (builtin.arch == .i386) { |
| 827 | 827 | return socketcall(SC_getpeername, &[3]usize{ @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), @ptrToInt(len) }); |
| 828 | 828 | } |
| 829 | return syscall3(SYS_getpeername, @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), @ptrToInt(len)); | |
| 829 | return syscall3(.getpeername, @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), @ptrToInt(len)); | |
| 830 | 830 | } |
| 831 | 831 | |
| 832 | 832 | pub fn socket(domain: u32, socket_type: u32, protocol: u32) usize { |
| 833 | 833 | if (builtin.arch == .i386) { |
| 834 | 834 | return socketcall(SC_socket, &[3]usize{ domain, socket_type, protocol }); |
| 835 | 835 | } |
| 836 | return syscall3(SYS_socket, domain, socket_type, protocol); | |
| 836 | return syscall3(.socket, domain, socket_type, protocol); | |
| 837 | 837 | } |
| 838 | 838 | |
| 839 | 839 | pub fn setsockopt(fd: i32, level: u32, optname: u32, optval: [*]const u8, optlen: socklen_t) usize { |
| 840 | 840 | if (builtin.arch == .i386) { |
| 841 | 841 | return socketcall(SC_setsockopt, &[5]usize{ @bitCast(usize, @as(isize, fd)), level, optname, @ptrToInt(optval), @intCast(usize, optlen) }); |
| 842 | 842 | } |
| 843 | return syscall5(SYS_setsockopt, @bitCast(usize, @as(isize, fd)), level, optname, @ptrToInt(optval), @intCast(usize, optlen)); | |
| 843 | return syscall5(.setsockopt, @bitCast(usize, @as(isize, fd)), level, optname, @ptrToInt(optval), @intCast(usize, optlen)); | |
| 844 | 844 | } |
| 845 | 845 | |
| 846 | 846 | pub fn getsockopt(fd: i32, level: u32, optname: u32, noalias optval: [*]u8, noalias optlen: *socklen_t) usize { |
| 847 | 847 | if (builtin.arch == .i386) { |
| 848 | 848 | return socketcall(SC_getsockopt, &[5]usize{ @bitCast(usize, @as(isize, fd)), level, optname, @ptrToInt(optval), @ptrToInt(optlen) }); |
| 849 | 849 | } |
| 850 | return syscall5(SYS_getsockopt, @bitCast(usize, @as(isize, fd)), level, optname, @ptrToInt(optval), @ptrToInt(optlen)); | |
| 850 | return syscall5(.getsockopt, @bitCast(usize, @as(isize, fd)), level, optname, @ptrToInt(optval), @ptrToInt(optlen)); | |
| 851 | 851 | } |
| 852 | 852 | |
| 853 | 853 | pub fn sendmsg(fd: i32, msg: *msghdr_const, flags: u32) usize { |
| 854 | 854 | if (builtin.arch == .i386) { |
| 855 | 855 | return socketcall(SC_sendmsg, &[3]usize{ @bitCast(usize, @as(isize, fd)), @ptrToInt(msg), flags }); |
| 856 | 856 | } |
| 857 | return syscall3(SYS_sendmsg, @bitCast(usize, @as(isize, fd)), @ptrToInt(msg), flags); | |
| 857 | return syscall3(.sendmsg, @bitCast(usize, @as(isize, fd)), @ptrToInt(msg), flags); | |
| 858 | 858 | } |
| 859 | 859 | |
| 860 | 860 | pub fn sendmmsg(fd: i32, msgvec: [*]mmsghdr_const, vlen: u32, flags: u32) usize { |
| ... | ... | @@ -872,7 +872,7 @@ pub fn sendmmsg(fd: i32, msgvec: [*]mmsghdr_const, vlen: u32, flags: u32) usize |
| 872 | 872 | // batch-send all messages up to the current message |
| 873 | 873 | if (next_unsent < i) { |
| 874 | 874 | const batch_size = i - next_unsent; |
| 875 | const r = syscall4(SYS_sendmmsg, @bitCast(usize, @as(isize, fd)), @ptrToInt(&msgvec[next_unsent]), batch_size, flags); | |
| 875 | const r = syscall4(.sendmmsg, @bitCast(usize, @as(isize, fd)), @ptrToInt(&msgvec[next_unsent]), batch_size, flags); | |
| 876 | 876 | if (getErrno(r) != 0) return next_unsent; |
| 877 | 877 | if (r < batch_size) return next_unsent + r; |
| 878 | 878 | } |
| ... | ... | @@ -888,68 +888,68 @@ pub fn sendmmsg(fd: i32, msgvec: [*]mmsghdr_const, vlen: u32, flags: u32) usize |
| 888 | 888 | } |
| 889 | 889 | if (next_unsent < kvlen or next_unsent == 0) { // want to make sure at least one syscall occurs (e.g. to trigger MSG_EOR) |
| 890 | 890 | const batch_size = kvlen - next_unsent; |
| 891 | const r = syscall4(SYS_sendmmsg, @bitCast(usize, @as(isize, fd)), @ptrToInt(&msgvec[next_unsent]), batch_size, flags); | |
| 891 | const r = syscall4(.sendmmsg, @bitCast(usize, @as(isize, fd)), @ptrToInt(&msgvec[next_unsent]), batch_size, flags); | |
| 892 | 892 | if (getErrno(r) != 0) return r; |
| 893 | 893 | return next_unsent + r; |
| 894 | 894 | } |
| 895 | 895 | return kvlen; |
| 896 | 896 | } |
| 897 | return syscall4(SYS_sendmmsg, @bitCast(usize, @as(isize, fd)), @ptrToInt(msgvec), vlen, flags); | |
| 897 | return syscall4(.sendmmsg, @bitCast(usize, @as(isize, fd)), @ptrToInt(msgvec), vlen, flags); | |
| 898 | 898 | } |
| 899 | 899 | |
| 900 | 900 | pub fn connect(fd: i32, addr: *const c_void, len: socklen_t) usize { |
| 901 | 901 | if (builtin.arch == .i386) { |
| 902 | 902 | return socketcall(SC_connect, &[3]usize{ @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), len }); |
| 903 | 903 | } |
| 904 | return syscall3(SYS_connect, @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), len); | |
| 904 | return syscall3(.connect, @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), len); | |
| 905 | 905 | } |
| 906 | 906 | |
| 907 | 907 | pub fn recvmsg(fd: i32, msg: *msghdr, flags: u32) usize { |
| 908 | 908 | if (builtin.arch == .i386) { |
| 909 | 909 | return socketcall(SC_recvmsg, &[3]usize{ @bitCast(usize, @as(isize, fd)), @ptrToInt(msg), flags }); |
| 910 | 910 | } |
| 911 | return syscall3(SYS_recvmsg, @bitCast(usize, @as(isize, fd)), @ptrToInt(msg), flags); | |
| 911 | return syscall3(.recvmsg, @bitCast(usize, @as(isize, fd)), @ptrToInt(msg), flags); | |
| 912 | 912 | } |
| 913 | 913 | |
| 914 | 914 | pub fn recvfrom(fd: i32, noalias buf: [*]u8, len: usize, flags: u32, noalias addr: ?*sockaddr, noalias alen: ?*socklen_t) usize { |
| 915 | 915 | if (builtin.arch == .i386) { |
| 916 | 916 | return socketcall(SC_recvfrom, &[6]usize{ @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), len, flags, @ptrToInt(addr), @ptrToInt(alen) }); |
| 917 | 917 | } |
| 918 | return syscall6(SYS_recvfrom, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), len, flags, @ptrToInt(addr), @ptrToInt(alen)); | |
| 918 | return syscall6(.recvfrom, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), len, flags, @ptrToInt(addr), @ptrToInt(alen)); | |
| 919 | 919 | } |
| 920 | 920 | |
| 921 | 921 | pub fn shutdown(fd: i32, how: i32) usize { |
| 922 | 922 | if (builtin.arch == .i386) { |
| 923 | 923 | return socketcall(SC_shutdown, &[2]usize{ @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, how)) }); |
| 924 | 924 | } |
| 925 | return syscall2(SYS_shutdown, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, how))); | |
| 925 | return syscall2(.shutdown, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, how))); | |
| 926 | 926 | } |
| 927 | 927 | |
| 928 | 928 | pub fn bind(fd: i32, addr: *const sockaddr, len: socklen_t) usize { |
| 929 | 929 | if (builtin.arch == .i386) { |
| 930 | 930 | return socketcall(SC_bind, &[3]usize{ @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), @intCast(usize, len) }); |
| 931 | 931 | } |
| 932 | return syscall3(SYS_bind, @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), @intCast(usize, len)); | |
| 932 | return syscall3(.bind, @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), @intCast(usize, len)); | |
| 933 | 933 | } |
| 934 | 934 | |
| 935 | 935 | pub fn listen(fd: i32, backlog: u32) usize { |
| 936 | 936 | if (builtin.arch == .i386) { |
| 937 | 937 | return socketcall(SC_listen, &[2]usize{ @bitCast(usize, @as(isize, fd)), backlog }); |
| 938 | 938 | } |
| 939 | return syscall2(SYS_listen, @bitCast(usize, @as(isize, fd)), backlog); | |
| 939 | return syscall2(.listen, @bitCast(usize, @as(isize, fd)), backlog); | |
| 940 | 940 | } |
| 941 | 941 | |
| 942 | 942 | pub fn sendto(fd: i32, buf: [*]const u8, len: usize, flags: u32, addr: ?*const sockaddr, alen: socklen_t) usize { |
| 943 | 943 | if (builtin.arch == .i386) { |
| 944 | 944 | return socketcall(SC_sendto, &[6]usize{ @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), len, flags, @ptrToInt(addr), @intCast(usize, alen) }); |
| 945 | 945 | } |
| 946 | return syscall6(SYS_sendto, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), len, flags, @ptrToInt(addr), @intCast(usize, alen)); | |
| 946 | return syscall6(.sendto, @bitCast(usize, @as(isize, fd)), @ptrToInt(buf), len, flags, @ptrToInt(addr), @intCast(usize, alen)); | |
| 947 | 947 | } |
| 948 | 948 | |
| 949 | 949 | pub fn sendfile(outfd: i32, infd: i32, offset: ?*i64, count: usize) usize { |
| 950 | if (@hasDecl(@This(), "SYS_sendfile64")) { | |
| 950 | if (@hasField(SYS, "sendfile64")) { | |
| 951 | 951 | return syscall4( |
| 952 | SYS_sendfile64, | |
| 952 | .sendfile64, | |
| 953 | 953 | @bitCast(usize, @as(isize, outfd)), |
| 954 | 954 | @bitCast(usize, @as(isize, infd)), |
| 955 | 955 | @ptrToInt(offset), |
| ... | ... | @@ -957,7 +957,7 @@ pub fn sendfile(outfd: i32, infd: i32, offset: ?*i64, count: usize) usize { |
| 957 | 957 | ); |
| 958 | 958 | } else { |
| 959 | 959 | return syscall4( |
| 960 | SYS_sendfile, | |
| 960 | .sendfile, | |
| 961 | 961 | @bitCast(usize, @as(isize, outfd)), |
| 962 | 962 | @bitCast(usize, @as(isize, infd)), |
| 963 | 963 | @ptrToInt(offset), |
| ... | ... | @@ -970,7 +970,7 @@ pub fn socketpair(domain: i32, socket_type: i32, protocol: i32, fd: [2]i32) usiz |
| 970 | 970 | if (builtin.arch == .i386) { |
| 971 | 971 | return socketcall(SC_socketpair, &[4]usize{ @intCast(usize, domain), @intCast(usize, socket_type), @intCast(usize, protocol), @ptrToInt(&fd[0]) }); |
| 972 | 972 | } |
| 973 | return syscall4(SYS_socketpair, @intCast(usize, domain), @intCast(usize, socket_type), @intCast(usize, protocol), @ptrToInt(&fd[0])); | |
| 973 | return syscall4(.socketpair, @intCast(usize, domain), @intCast(usize, socket_type), @intCast(usize, protocol), @ptrToInt(&fd[0])); | |
| 974 | 974 | } |
| 975 | 975 | |
| 976 | 976 | pub fn accept(fd: i32, noalias addr: *sockaddr, noalias len: *socklen_t) usize { |
| ... | ... | @@ -984,45 +984,45 @@ pub fn accept4(fd: i32, noalias addr: *sockaddr, noalias len: *socklen_t, flags: |
| 984 | 984 | if (builtin.arch == .i386) { |
| 985 | 985 | return socketcall(SC_accept4, &[4]usize{ @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), @ptrToInt(len), flags }); |
| 986 | 986 | } |
| 987 | return syscall4(SYS_accept4, @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), @ptrToInt(len), flags); | |
| 987 | return syscall4(.accept4, @bitCast(usize, @as(isize, fd)), @ptrToInt(addr), @ptrToInt(len), flags); | |
| 988 | 988 | } |
| 989 | 989 | |
| 990 | 990 | pub fn fstat(fd: i32, stat_buf: *Stat) usize { |
| 991 | if (@hasDecl(@This(), "SYS_fstat64")) { | |
| 992 | return syscall2(SYS_fstat64, @bitCast(usize, @as(isize, fd)), @ptrToInt(stat_buf)); | |
| 991 | if (@hasField(SYS, "fstat64")) { | |
| 992 | return syscall2(.fstat64, @bitCast(usize, @as(isize, fd)), @ptrToInt(stat_buf)); | |
| 993 | 993 | } else { |
| 994 | return syscall2(SYS_fstat, @bitCast(usize, @as(isize, fd)), @ptrToInt(stat_buf)); | |
| 994 | return syscall2(.fstat, @bitCast(usize, @as(isize, fd)), @ptrToInt(stat_buf)); | |
| 995 | 995 | } |
| 996 | 996 | } |
| 997 | 997 | |
| 998 | 998 | pub fn stat(pathname: [*:0]const u8, statbuf: *Stat) usize { |
| 999 | if (@hasDecl(@This(), "SYS_stat64")) { | |
| 1000 | return syscall2(SYS_stat64, @ptrToInt(pathname), @ptrToInt(statbuf)); | |
| 999 | if (@hasField(SYS, "stat64")) { | |
| 1000 | return syscall2(.stat64, @ptrToInt(pathname), @ptrToInt(statbuf)); | |
| 1001 | 1001 | } else { |
| 1002 | return syscall2(SYS_stat, @ptrToInt(pathname), @ptrToInt(statbuf)); | |
| 1002 | return syscall2(.stat, @ptrToInt(pathname), @ptrToInt(statbuf)); | |
| 1003 | 1003 | } |
| 1004 | 1004 | } |
| 1005 | 1005 | |
| 1006 | 1006 | pub fn lstat(pathname: [*:0]const u8, statbuf: *Stat) usize { |
| 1007 | if (@hasDecl(@This(), "SYS_lstat64")) { | |
| 1008 | return syscall2(SYS_lstat64, @ptrToInt(pathname), @ptrToInt(statbuf)); | |
| 1007 | if (@hasField(SYS, "lstat64")) { | |
| 1008 | return syscall2(.lstat64, @ptrToInt(pathname), @ptrToInt(statbuf)); | |
| 1009 | 1009 | } else { |
| 1010 | return syscall2(SYS_lstat, @ptrToInt(pathname), @ptrToInt(statbuf)); | |
| 1010 | return syscall2(.lstat, @ptrToInt(pathname), @ptrToInt(statbuf)); | |
| 1011 | 1011 | } |
| 1012 | 1012 | } |
| 1013 | 1013 | |
| 1014 | 1014 | pub fn fstatat(dirfd: i32, path: [*:0]const u8, stat_buf: *Stat, flags: u32) usize { |
| 1015 | if (@hasDecl(@This(), "SYS_fstatat64")) { | |
| 1016 | return syscall4(SYS_fstatat64, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), @ptrToInt(stat_buf), flags); | |
| 1015 | if (@hasField(SYS, "fstatat64")) { | |
| 1016 | return syscall4(.fstatat64, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), @ptrToInt(stat_buf), flags); | |
| 1017 | 1017 | } else { |
| 1018 | return syscall4(SYS_fstatat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), @ptrToInt(stat_buf), flags); | |
| 1018 | return syscall4(.fstatat, @bitCast(usize, @as(isize, dirfd)), @ptrToInt(path), @ptrToInt(stat_buf), flags); | |
| 1019 | 1019 | } |
| 1020 | 1020 | } |
| 1021 | 1021 | |
| 1022 | 1022 | pub fn statx(dirfd: i32, path: [*]const u8, flags: u32, mask: u32, statx_buf: *Statx) usize { |
| 1023 | if (@hasDecl(@This(), "SYS_statx")) { | |
| 1023 | if (@hasField(SYS, "statx")) { | |
| 1024 | 1024 | return syscall5( |
| 1025 | SYS_statx, | |
| 1025 | .statx, | |
| 1026 | 1026 | @bitCast(usize, @as(isize, dirfd)), |
| 1027 | 1027 | @ptrToInt(path), |
| 1028 | 1028 | flags, |
| ... | ... | @@ -1034,59 +1034,59 @@ pub fn statx(dirfd: i32, path: [*]const u8, flags: u32, mask: u32, statx_buf: *S |
| 1034 | 1034 | } |
| 1035 | 1035 | |
| 1036 | 1036 | pub fn listxattr(path: [*:0]const u8, list: [*]u8, size: usize) usize { |
| 1037 | return syscall3(SYS_listxattr, @ptrToInt(path), @ptrToInt(list), size); | |
| 1037 | return syscall3(.listxattr, @ptrToInt(path), @ptrToInt(list), size); | |
| 1038 | 1038 | } |
| 1039 | 1039 | |
| 1040 | 1040 | pub fn llistxattr(path: [*:0]const u8, list: [*]u8, size: usize) usize { |
| 1041 | return syscall3(SYS_llistxattr, @ptrToInt(path), @ptrToInt(list), size); | |
| 1041 | return syscall3(.llistxattr, @ptrToInt(path), @ptrToInt(list), size); | |
| 1042 | 1042 | } |
| 1043 | 1043 | |
| 1044 | 1044 | pub fn flistxattr(fd: usize, list: [*]u8, size: usize) usize { |
| 1045 | return syscall3(SYS_flistxattr, fd, @ptrToInt(list), size); | |
| 1045 | return syscall3(.flistxattr, fd, @ptrToInt(list), size); | |
| 1046 | 1046 | } |
| 1047 | 1047 | |
| 1048 | 1048 | pub fn getxattr(path: [*:0]const u8, name: [*:0]const u8, value: [*]u8, size: usize) usize { |
| 1049 | return syscall4(SYS_getxattr, @ptrToInt(path), @ptrToInt(name), @ptrToInt(value), size); | |
| 1049 | return syscall4(.getxattr, @ptrToInt(path), @ptrToInt(name), @ptrToInt(value), size); | |
| 1050 | 1050 | } |
| 1051 | 1051 | |
| 1052 | 1052 | pub fn lgetxattr(path: [*:0]const u8, name: [*:0]const u8, value: [*]u8, size: usize) usize { |
| 1053 | return syscall4(SYS_lgetxattr, @ptrToInt(path), @ptrToInt(name), @ptrToInt(value), size); | |
| 1053 | return syscall4(.lgetxattr, @ptrToInt(path), @ptrToInt(name), @ptrToInt(value), size); | |
| 1054 | 1054 | } |
| 1055 | 1055 | |
| 1056 | 1056 | pub fn fgetxattr(fd: usize, name: [*:0]const u8, value: [*]u8, size: usize) usize { |
| 1057 | return syscall4(SYS_lgetxattr, fd, @ptrToInt(name), @ptrToInt(value), size); | |
| 1057 | return syscall4(.lgetxattr, fd, @ptrToInt(name), @ptrToInt(value), size); | |
| 1058 | 1058 | } |
| 1059 | 1059 | |
| 1060 | 1060 | pub fn setxattr(path: [*:0]const u8, name: [*:0]const u8, value: *const void, size: usize, flags: usize) usize { |
| 1061 | return syscall5(SYS_setxattr, @ptrToInt(path), @ptrToInt(name), @ptrToInt(value), size, flags); | |
| 1061 | return syscall5(.setxattr, @ptrToInt(path), @ptrToInt(name), @ptrToInt(value), size, flags); | |
| 1062 | 1062 | } |
| 1063 | 1063 | |
| 1064 | 1064 | pub fn lsetxattr(path: [*:0]const u8, name: [*:0]const u8, value: *const void, size: usize, flags: usize) usize { |
| 1065 | return syscall5(SYS_lsetxattr, @ptrToInt(path), @ptrToInt(name), @ptrToInt(value), size, flags); | |
| 1065 | return syscall5(.lsetxattr, @ptrToInt(path), @ptrToInt(name), @ptrToInt(value), size, flags); | |
| 1066 | 1066 | } |
| 1067 | 1067 | |
| 1068 | 1068 | pub fn fsetxattr(fd: usize, name: [*:0]const u8, value: *const void, size: usize, flags: usize) usize { |
| 1069 | return syscall5(SYS_fsetxattr, fd, @ptrToInt(name), @ptrToInt(value), size, flags); | |
| 1069 | return syscall5(.fsetxattr, fd, @ptrToInt(name), @ptrToInt(value), size, flags); | |
| 1070 | 1070 | } |
| 1071 | 1071 | |
| 1072 | 1072 | pub fn removexattr(path: [*:0]const u8, name: [*:0]const u8) usize { |
| 1073 | return syscall2(SYS_removexattr, @ptrToInt(path), @ptrToInt(name)); | |
| 1073 | return syscall2(.removexattr, @ptrToInt(path), @ptrToInt(name)); | |
| 1074 | 1074 | } |
| 1075 | 1075 | |
| 1076 | 1076 | pub fn lremovexattr(path: [*:0]const u8, name: [*:0]const u8) usize { |
| 1077 | return syscall2(SYS_lremovexattr, @ptrToInt(path), @ptrToInt(name)); | |
| 1077 | return syscall2(.lremovexattr, @ptrToInt(path), @ptrToInt(name)); | |
| 1078 | 1078 | } |
| 1079 | 1079 | |
| 1080 | 1080 | pub fn fremovexattr(fd: usize, name: [*:0]const u8) usize { |
| 1081 | return syscall2(SYS_fremovexattr, fd, @ptrToInt(name)); | |
| 1081 | return syscall2(.fremovexattr, fd, @ptrToInt(name)); | |
| 1082 | 1082 | } |
| 1083 | 1083 | |
| 1084 | 1084 | pub fn sched_yield() usize { |
| 1085 | return syscall0(SYS_sched_yield); | |
| 1085 | return syscall0(.sched_yield); | |
| 1086 | 1086 | } |
| 1087 | 1087 | |
| 1088 | 1088 | pub fn sched_getaffinity(pid: pid_t, size: usize, set: *cpu_set_t) usize { |
| 1089 | const rc = syscall3(SYS_sched_getaffinity, @bitCast(usize, @as(isize, pid)), size, @ptrToInt(set)); | |
| 1089 | const rc = syscall3(.sched_getaffinity, @bitCast(usize, @as(isize, pid)), size, @ptrToInt(set)); | |
| 1090 | 1090 | if (@bitCast(isize, rc) < 0) return rc; |
| 1091 | 1091 | if (rc < size) @memset(@ptrCast([*]u8, set) + rc, 0, size - rc); |
| 1092 | 1092 | return 0; |
| ... | ... | @@ -1097,11 +1097,11 @@ pub fn epoll_create() usize { |
| 1097 | 1097 | } |
| 1098 | 1098 | |
| 1099 | 1099 | pub fn epoll_create1(flags: usize) usize { |
| 1100 | return syscall1(SYS_epoll_create1, flags); | |
| 1100 | return syscall1(.epoll_create1, flags); | |
| 1101 | 1101 | } |
| 1102 | 1102 | |
| 1103 | 1103 | pub fn epoll_ctl(epoll_fd: i32, op: u32, fd: i32, ev: ?*epoll_event) usize { |
| 1104 | return syscall4(SYS_epoll_ctl, @bitCast(usize, @as(isize, epoll_fd)), @intCast(usize, op), @bitCast(usize, @as(isize, fd)), @ptrToInt(ev)); | |
| 1104 | return syscall4(.epoll_ctl, @bitCast(usize, @as(isize, epoll_fd)), @intCast(usize, op), @bitCast(usize, @as(isize, fd)), @ptrToInt(ev)); | |
| 1105 | 1105 | } |
| 1106 | 1106 | |
| 1107 | 1107 | pub fn epoll_wait(epoll_fd: i32, events: [*]epoll_event, maxevents: u32, timeout: i32) usize { |
| ... | ... | @@ -1110,7 +1110,7 @@ pub fn epoll_wait(epoll_fd: i32, events: [*]epoll_event, maxevents: u32, timeout |
| 1110 | 1110 | |
| 1111 | 1111 | pub fn epoll_pwait(epoll_fd: i32, events: [*]epoll_event, maxevents: u32, timeout: i32, sigmask: ?*sigset_t) usize { |
| 1112 | 1112 | return syscall6( |
| 1113 | SYS_epoll_pwait, | |
| 1113 | .epoll_pwait, | |
| 1114 | 1114 | @bitCast(usize, @as(isize, epoll_fd)), |
| 1115 | 1115 | @ptrToInt(events), |
| 1116 | 1116 | @intCast(usize, maxevents), |
| ... | ... | @@ -1121,11 +1121,11 @@ pub fn epoll_pwait(epoll_fd: i32, events: [*]epoll_event, maxevents: u32, timeou |
| 1121 | 1121 | } |
| 1122 | 1122 | |
| 1123 | 1123 | pub fn eventfd(count: u32, flags: u32) usize { |
| 1124 | return syscall2(SYS_eventfd2, count, flags); | |
| 1124 | return syscall2(.eventfd2, count, flags); | |
| 1125 | 1125 | } |
| 1126 | 1126 | |
| 1127 | 1127 | pub fn timerfd_create(clockid: i32, flags: u32) usize { |
| 1128 | return syscall2(SYS_timerfd_create, @bitCast(usize, @as(isize, clockid)), flags); | |
| 1128 | return syscall2(.timerfd_create, @bitCast(usize, @as(isize, clockid)), flags); | |
| 1129 | 1129 | } |
| 1130 | 1130 | |
| 1131 | 1131 | pub const itimerspec = extern struct { |
| ... | ... | @@ -1134,59 +1134,59 @@ pub const itimerspec = extern struct { |
| 1134 | 1134 | }; |
| 1135 | 1135 | |
| 1136 | 1136 | pub fn timerfd_gettime(fd: i32, curr_value: *itimerspec) usize { |
| 1137 | return syscall2(SYS_timerfd_gettime, @bitCast(usize, @as(isize, fd)), @ptrToInt(curr_value)); | |
| 1137 | return syscall2(.timerfd_gettime, @bitCast(usize, @as(isize, fd)), @ptrToInt(curr_value)); | |
| 1138 | 1138 | } |
| 1139 | 1139 | |
| 1140 | 1140 | pub fn timerfd_settime(fd: i32, flags: u32, new_value: *const itimerspec, old_value: ?*itimerspec) usize { |
| 1141 | return syscall4(SYS_timerfd_settime, @bitCast(usize, @as(isize, fd)), flags, @ptrToInt(new_value), @ptrToInt(old_value)); | |
| 1141 | return syscall4(.timerfd_settime, @bitCast(usize, @as(isize, fd)), flags, @ptrToInt(new_value), @ptrToInt(old_value)); | |
| 1142 | 1142 | } |
| 1143 | 1143 | |
| 1144 | 1144 | pub fn unshare(flags: usize) usize { |
| 1145 | return syscall1(SYS_unshare, flags); | |
| 1145 | return syscall1(.unshare, flags); | |
| 1146 | 1146 | } |
| 1147 | 1147 | |
| 1148 | 1148 | pub fn capget(hdrp: *cap_user_header_t, datap: *cap_user_data_t) usize { |
| 1149 | return syscall2(SYS_capget, @ptrToInt(hdrp), @ptrToInt(datap)); | |
| 1149 | return syscall2(.capget, @ptrToInt(hdrp), @ptrToInt(datap)); | |
| 1150 | 1150 | } |
| 1151 | 1151 | |
| 1152 | 1152 | pub fn capset(hdrp: *cap_user_header_t, datap: *const cap_user_data_t) usize { |
| 1153 | return syscall2(SYS_capset, @ptrToInt(hdrp), @ptrToInt(datap)); | |
| 1153 | return syscall2(.capset, @ptrToInt(hdrp), @ptrToInt(datap)); | |
| 1154 | 1154 | } |
| 1155 | 1155 | |
| 1156 | 1156 | pub fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) usize { |
| 1157 | return syscall2(SYS_sigaltstack, @ptrToInt(ss), @ptrToInt(old_ss)); | |
| 1157 | return syscall2(.sigaltstack, @ptrToInt(ss), @ptrToInt(old_ss)); | |
| 1158 | 1158 | } |
| 1159 | 1159 | |
| 1160 | 1160 | pub fn uname(uts: *utsname) usize { |
| 1161 | return syscall1(SYS_uname, @ptrToInt(uts)); | |
| 1161 | return syscall1(.uname, @ptrToInt(uts)); | |
| 1162 | 1162 | } |
| 1163 | 1163 | |
| 1164 | 1164 | pub fn io_uring_setup(entries: u32, p: *io_uring_params) usize { |
| 1165 | return syscall2(SYS_io_uring_setup, entries, @ptrToInt(p)); | |
| 1165 | return syscall2(.io_uring_setup, entries, @ptrToInt(p)); | |
| 1166 | 1166 | } |
| 1167 | 1167 | |
| 1168 | 1168 | pub fn io_uring_enter(fd: i32, to_submit: u32, min_complete: u32, flags: u32, sig: ?*sigset_t) usize { |
| 1169 | return syscall6(SYS_io_uring_enter, @bitCast(usize, @as(isize, fd)), to_submit, min_complete, flags, @ptrToInt(sig), NSIG / 8); | |
| 1169 | return syscall6(.io_uring_enter, @bitCast(usize, @as(isize, fd)), to_submit, min_complete, flags, @ptrToInt(sig), NSIG / 8); | |
| 1170 | 1170 | } |
| 1171 | 1171 | |
| 1172 | 1172 | pub fn io_uring_register(fd: i32, opcode: IORING_REGISTER, arg: ?*const c_void, nr_args: u32) usize { |
| 1173 | return syscall4(SYS_io_uring_register, @bitCast(usize, @as(isize, fd)), @enumToInt(opcode), @ptrToInt(arg), nr_args); | |
| 1173 | return syscall4(.io_uring_register, @bitCast(usize, @as(isize, fd)), @enumToInt(opcode), @ptrToInt(arg), nr_args); | |
| 1174 | 1174 | } |
| 1175 | 1175 | |
| 1176 | 1176 | pub fn memfd_create(name: [*:0]const u8, flags: u32) usize { |
| 1177 | return syscall2(SYS_memfd_create, @ptrToInt(name), flags); | |
| 1177 | return syscall2(.memfd_create, @ptrToInt(name), flags); | |
| 1178 | 1178 | } |
| 1179 | 1179 | |
| 1180 | 1180 | pub fn getrusage(who: i32, usage: *rusage) usize { |
| 1181 | return syscall2(SYS_getrusage, @bitCast(usize, @as(isize, who)), @ptrToInt(usage)); | |
| 1181 | return syscall2(.getrusage, @bitCast(usize, @as(isize, who)), @ptrToInt(usage)); | |
| 1182 | 1182 | } |
| 1183 | 1183 | |
| 1184 | 1184 | pub fn tcgetattr(fd: fd_t, termios_p: *termios) usize { |
| 1185 | return syscall3(SYS_ioctl, @bitCast(usize, @as(isize, fd)), TCGETS, @ptrToInt(termios_p)); | |
| 1185 | return syscall3(.ioctl, @bitCast(usize, @as(isize, fd)), TCGETS, @ptrToInt(termios_p)); | |
| 1186 | 1186 | } |
| 1187 | 1187 | |
| 1188 | 1188 | pub fn tcsetattr(fd: fd_t, optional_action: TCSA, termios_p: *const termios) usize { |
| 1189 | return syscall3(SYS_ioctl, @bitCast(usize, @as(isize, fd)), TCSETS + @enumToInt(optional_action), @ptrToInt(termios_p)); | |
| 1189 | return syscall3(.ioctl, @bitCast(usize, @as(isize, fd)), TCSETS + @enumToInt(optional_action), @ptrToInt(termios_p)); | |
| 1190 | 1190 | } |
| 1191 | 1191 | |
| 1192 | 1192 | test "" { |
lib/std/os/linux/arm-eabi.zig+16-16| ... | ... | @@ -1,36 +1,36 @@ |
| 1 | 1 | usingnamespace @import("../bits.zig"); |
| 2 | 2 | |
| 3 | pub fn syscall0(number: usize) usize { | |
| 3 | pub fn syscall0(number: SYS) usize { | |
| 4 | 4 | return asm volatile ("svc #0" |
| 5 | 5 | : [ret] "={r0}" (-> usize) |
| 6 | : [number] "{r7}" (number) | |
| 6 | : [number] "{r7}" (@enumToInt(number)) | |
| 7 | 7 | : "memory" |
| 8 | 8 | ); |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | pub fn syscall1(number: usize, arg1: usize) usize { | |
| 11 | pub fn syscall1(number: SYS, arg1: usize) usize { | |
| 12 | 12 | return asm volatile ("svc #0" |
| 13 | 13 | : [ret] "={r0}" (-> usize) |
| 14 | : [number] "{r7}" (number), | |
| 14 | : [number] "{r7}" (@enumToInt(number)), | |
| 15 | 15 | [arg1] "{r0}" (arg1) |
| 16 | 16 | : "memory" |
| 17 | 17 | ); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | pub fn syscall2(number: usize, arg1: usize, arg2: usize) usize { | |
| 20 | pub fn syscall2(number: SYS, arg1: usize, arg2: usize) usize { | |
| 21 | 21 | return asm volatile ("svc #0" |
| 22 | 22 | : [ret] "={r0}" (-> usize) |
| 23 | : [number] "{r7}" (number), | |
| 23 | : [number] "{r7}" (@enumToInt(number)), | |
| 24 | 24 | [arg1] "{r0}" (arg1), |
| 25 | 25 | [arg2] "{r1}" (arg2) |
| 26 | 26 | : "memory" |
| 27 | 27 | ); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { | |
| 30 | pub fn syscall3(number: SYS, arg1: usize, arg2: usize, arg3: usize) usize { | |
| 31 | 31 | return asm volatile ("svc #0" |
| 32 | 32 | : [ret] "={r0}" (-> usize) |
| 33 | : [number] "{r7}" (number), | |
| 33 | : [number] "{r7}" (@enumToInt(number)), | |
| 34 | 34 | [arg1] "{r0}" (arg1), |
| 35 | 35 | [arg2] "{r1}" (arg2), |
| 36 | 36 | [arg3] "{r2}" (arg3) |
| ... | ... | @@ -38,10 +38,10 @@ pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { |
| 38 | 38 | ); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | pub fn syscall4(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usize) usize { | |
| 41 | pub fn syscall4(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize) usize { | |
| 42 | 42 | return asm volatile ("svc #0" |
| 43 | 43 | : [ret] "={r0}" (-> usize) |
| 44 | : [number] "{r7}" (number), | |
| 44 | : [number] "{r7}" (@enumToInt(number)), | |
| 45 | 45 | [arg1] "{r0}" (arg1), |
| 46 | 46 | [arg2] "{r1}" (arg2), |
| 47 | 47 | [arg3] "{r2}" (arg3), |
| ... | ... | @@ -50,10 +50,10 @@ pub fn syscall4(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize { | |
| 53 | pub fn syscall5(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize { | |
| 54 | 54 | return asm volatile ("svc #0" |
| 55 | 55 | : [ret] "={r0}" (-> usize) |
| 56 | : [number] "{r7}" (number), | |
| 56 | : [number] "{r7}" (@enumToInt(number)), | |
| 57 | 57 | [arg1] "{r0}" (arg1), |
| 58 | 58 | [arg2] "{r1}" (arg2), |
| 59 | 59 | [arg3] "{r2}" (arg3), |
| ... | ... | @@ -64,7 +64,7 @@ pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | pub fn syscall6( |
| 67 | number: usize, | |
| 67 | number: SYS, | |
| 68 | 68 | arg1: usize, |
| 69 | 69 | arg2: usize, |
| 70 | 70 | arg3: usize, |
| ... | ... | @@ -74,7 +74,7 @@ pub fn syscall6( |
| 74 | 74 | ) usize { |
| 75 | 75 | return asm volatile ("svc #0" |
| 76 | 76 | : [ret] "={r0}" (-> usize) |
| 77 | : [number] "{r7}" (number), | |
| 77 | : [number] "{r7}" (@enumToInt(number)), | |
| 78 | 78 | [arg1] "{r0}" (arg1), |
| 79 | 79 | [arg2] "{r1}" (arg2), |
| 80 | 80 | [arg3] "{r2}" (arg3), |
| ... | ... | @@ -91,7 +91,7 @@ pub extern fn clone(func: extern fn (arg: usize) u8, stack: usize, flags: u32, a |
| 91 | 91 | pub fn restore() callconv(.Naked) void { |
| 92 | 92 | return asm volatile ("svc #0" |
| 93 | 93 | : |
| 94 | : [number] "{r7}" (@as(usize, SYS_sigreturn)) | |
| 94 | : [number] "{r7}" (@enumToInt(SYS.sigreturn)) | |
| 95 | 95 | : "memory" |
| 96 | 96 | ); |
| 97 | 97 | } |
| ... | ... | @@ -99,7 +99,7 @@ pub fn restore() callconv(.Naked) void { |
| 99 | 99 | pub fn restore_rt() callconv(.Naked) void { |
| 100 | 100 | return asm volatile ("svc #0" |
| 101 | 101 | : |
| 102 | : [number] "{r7}" (@as(usize, SYS_rt_sigreturn)) | |
| 102 | : [number] "{r7}" (@enumToInt(SYS.rt_sigreturn)) | |
| 103 | 103 | : "memory" |
| 104 | 104 | ); |
| 105 | 105 | } |
lib/std/os/linux/arm64.zig+15-15| ... | ... | @@ -1,36 +1,36 @@ |
| 1 | 1 | usingnamespace @import("../bits.zig"); |
| 2 | 2 | |
| 3 | pub fn syscall0(number: usize) usize { | |
| 3 | pub fn syscall0(number: SYS) usize { | |
| 4 | 4 | return asm volatile ("svc #0" |
| 5 | 5 | : [ret] "={x0}" (-> usize) |
| 6 | : [number] "{x8}" (number) | |
| 6 | : [number] "{x8}" (@enumToInt(number)) | |
| 7 | 7 | : "memory", "cc" |
| 8 | 8 | ); |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | pub fn syscall1(number: usize, arg1: usize) usize { | |
| 11 | pub fn syscall1(number: SYS, arg1: usize) usize { | |
| 12 | 12 | return asm volatile ("svc #0" |
| 13 | 13 | : [ret] "={x0}" (-> usize) |
| 14 | : [number] "{x8}" (number), | |
| 14 | : [number] "{x8}" (@enumToInt(number)), | |
| 15 | 15 | [arg1] "{x0}" (arg1) |
| 16 | 16 | : "memory", "cc" |
| 17 | 17 | ); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | pub fn syscall2(number: usize, arg1: usize, arg2: usize) usize { | |
| 20 | pub fn syscall2(number: SYS, arg1: usize, arg2: usize) usize { | |
| 21 | 21 | return asm volatile ("svc #0" |
| 22 | 22 | : [ret] "={x0}" (-> usize) |
| 23 | : [number] "{x8}" (number), | |
| 23 | : [number] "{x8}" (@enumToInt(number)), | |
| 24 | 24 | [arg1] "{x0}" (arg1), |
| 25 | 25 | [arg2] "{x1}" (arg2) |
| 26 | 26 | : "memory", "cc" |
| 27 | 27 | ); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { | |
| 30 | pub fn syscall3(number: SYS, arg1: usize, arg2: usize, arg3: usize) usize { | |
| 31 | 31 | return asm volatile ("svc #0" |
| 32 | 32 | : [ret] "={x0}" (-> usize) |
| 33 | : [number] "{x8}" (number), | |
| 33 | : [number] "{x8}" (@enumToInt(number)), | |
| 34 | 34 | [arg1] "{x0}" (arg1), |
| 35 | 35 | [arg2] "{x1}" (arg2), |
| 36 | 36 | [arg3] "{x2}" (arg3) |
| ... | ... | @@ -38,10 +38,10 @@ pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { |
| 38 | 38 | ); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | pub fn syscall4(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usize) usize { | |
| 41 | pub fn syscall4(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize) usize { | |
| 42 | 42 | return asm volatile ("svc #0" |
| 43 | 43 | : [ret] "={x0}" (-> usize) |
| 44 | : [number] "{x8}" (number), | |
| 44 | : [number] "{x8}" (@enumToInt(number)), | |
| 45 | 45 | [arg1] "{x0}" (arg1), |
| 46 | 46 | [arg2] "{x1}" (arg2), |
| 47 | 47 | [arg3] "{x2}" (arg3), |
| ... | ... | @@ -50,10 +50,10 @@ pub fn syscall4(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize { | |
| 53 | pub fn syscall5(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize { | |
| 54 | 54 | return asm volatile ("svc #0" |
| 55 | 55 | : [ret] "={x0}" (-> usize) |
| 56 | : [number] "{x8}" (number), | |
| 56 | : [number] "{x8}" (@enumToInt(number)), | |
| 57 | 57 | [arg1] "{x0}" (arg1), |
| 58 | 58 | [arg2] "{x1}" (arg2), |
| 59 | 59 | [arg3] "{x2}" (arg3), |
| ... | ... | @@ -64,7 +64,7 @@ pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | pub fn syscall6( |
| 67 | number: usize, | |
| 67 | number: SYS, | |
| 68 | 68 | arg1: usize, |
| 69 | 69 | arg2: usize, |
| 70 | 70 | arg3: usize, |
| ... | ... | @@ -74,7 +74,7 @@ pub fn syscall6( |
| 74 | 74 | ) usize { |
| 75 | 75 | return asm volatile ("svc #0" |
| 76 | 76 | : [ret] "={x0}" (-> usize) |
| 77 | : [number] "{x8}" (number), | |
| 77 | : [number] "{x8}" (@enumToInt(number)), | |
| 78 | 78 | [arg1] "{x0}" (arg1), |
| 79 | 79 | [arg2] "{x1}" (arg2), |
| 80 | 80 | [arg3] "{x2}" (arg3), |
| ... | ... | @@ -93,7 +93,7 @@ pub const restore = restore_rt; |
| 93 | 93 | pub fn restore_rt() callconv(.Naked) void { |
| 94 | 94 | return asm volatile ("svc #0" |
| 95 | 95 | : |
| 96 | : [number] "{x8}" (@as(usize, SYS_rt_sigreturn)) | |
| 96 | : [number] "{x8}" (@enumToInt(SYS.rt_sigreturn)) | |
| 97 | 97 | : "memory", "cc" |
| 98 | 98 | ); |
| 99 | 99 | } |
lib/std/os/linux/i386.zig+17-17| ... | ... | @@ -1,36 +1,36 @@ |
| 1 | 1 | usingnamespace @import("../bits.zig"); |
| 2 | 2 | |
| 3 | pub fn syscall0(number: usize) usize { | |
| 3 | pub fn syscall0(number: SYS) usize { | |
| 4 | 4 | return asm volatile ("int $0x80" |
| 5 | 5 | : [ret] "={eax}" (-> usize) |
| 6 | : [number] "{eax}" (number) | |
| 6 | : [number] "{eax}" (@enumToInt(number)) | |
| 7 | 7 | : "memory" |
| 8 | 8 | ); |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | pub fn syscall1(number: usize, arg1: usize) usize { | |
| 11 | pub fn syscall1(number: SYS, arg1: usize) usize { | |
| 12 | 12 | return asm volatile ("int $0x80" |
| 13 | 13 | : [ret] "={eax}" (-> usize) |
| 14 | : [number] "{eax}" (number), | |
| 14 | : [number] "{eax}" (@enumToInt(number)), | |
| 15 | 15 | [arg1] "{ebx}" (arg1) |
| 16 | 16 | : "memory" |
| 17 | 17 | ); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | pub fn syscall2(number: usize, arg1: usize, arg2: usize) usize { | |
| 20 | pub fn syscall2(number: SYS, arg1: usize, arg2: usize) usize { | |
| 21 | 21 | return asm volatile ("int $0x80" |
| 22 | 22 | : [ret] "={eax}" (-> usize) |
| 23 | : [number] "{eax}" (number), | |
| 23 | : [number] "{eax}" (@enumToInt(number)), | |
| 24 | 24 | [arg1] "{ebx}" (arg1), |
| 25 | 25 | [arg2] "{ecx}" (arg2) |
| 26 | 26 | : "memory" |
| 27 | 27 | ); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { | |
| 30 | pub fn syscall3(number: SYS, arg1: usize, arg2: usize, arg3: usize) usize { | |
| 31 | 31 | return asm volatile ("int $0x80" |
| 32 | 32 | : [ret] "={eax}" (-> usize) |
| 33 | : [number] "{eax}" (number), | |
| 33 | : [number] "{eax}" (@enumToInt(number)), | |
| 34 | 34 | [arg1] "{ebx}" (arg1), |
| 35 | 35 | [arg2] "{ecx}" (arg2), |
| 36 | 36 | [arg3] "{edx}" (arg3) |
| ... | ... | @@ -38,10 +38,10 @@ pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { |
| 38 | 38 | ); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | pub fn syscall4(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usize) usize { | |
| 41 | pub fn syscall4(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize) usize { | |
| 42 | 42 | return asm volatile ("int $0x80" |
| 43 | 43 | : [ret] "={eax}" (-> usize) |
| 44 | : [number] "{eax}" (number), | |
| 44 | : [number] "{eax}" (@enumToInt(number)), | |
| 45 | 45 | [arg1] "{ebx}" (arg1), |
| 46 | 46 | [arg2] "{ecx}" (arg2), |
| 47 | 47 | [arg3] "{edx}" (arg3), |
| ... | ... | @@ -50,10 +50,10 @@ pub fn syscall4(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize { | |
| 53 | pub fn syscall5(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize { | |
| 54 | 54 | return asm volatile ("int $0x80" |
| 55 | 55 | : [ret] "={eax}" (-> usize) |
| 56 | : [number] "{eax}" (number), | |
| 56 | : [number] "{eax}" (@enumToInt(number)), | |
| 57 | 57 | [arg1] "{ebx}" (arg1), |
| 58 | 58 | [arg2] "{ecx}" (arg2), |
| 59 | 59 | [arg3] "{edx}" (arg3), |
| ... | ... | @@ -64,7 +64,7 @@ pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | pub fn syscall6( |
| 67 | number: usize, | |
| 67 | number: SYS, | |
| 68 | 68 | arg1: usize, |
| 69 | 69 | arg2: usize, |
| 70 | 70 | arg3: usize, |
| ... | ... | @@ -84,7 +84,7 @@ pub fn syscall6( |
| 84 | 84 | \\ pop %%ebp |
| 85 | 85 | \\ add $4, %%esp |
| 86 | 86 | : [ret] "={eax}" (-> usize) |
| 87 | : [number] "{eax}" (number), | |
| 87 | : [number] "{eax}" (@enumToInt(number)), | |
| 88 | 88 | [arg1] "{ebx}" (arg1), |
| 89 | 89 | [arg2] "{ecx}" (arg2), |
| 90 | 90 | [arg3] "{edx}" (arg3), |
| ... | ... | @@ -98,7 +98,7 @@ pub fn syscall6( |
| 98 | 98 | pub fn socketcall(call: usize, args: [*]usize) usize { |
| 99 | 99 | return asm volatile ("int $0x80" |
| 100 | 100 | : [ret] "={eax}" (-> usize) |
| 101 | : [number] "{eax}" (@as(usize, SYS_socketcall)), | |
| 101 | : [number] "{eax}" (@enumToInt(SYS.socketcall)), | |
| 102 | 102 | [arg1] "{ebx}" (call), |
| 103 | 103 | [arg2] "{ecx}" (@ptrToInt(args)) |
| 104 | 104 | : "memory" |
| ... | ... | @@ -111,7 +111,7 @@ pub extern fn clone(func: extern fn (arg: usize) u8, stack: usize, flags: u32, a |
| 111 | 111 | pub fn restore() callconv(.Naked) void { |
| 112 | 112 | return asm volatile ("int $0x80" |
| 113 | 113 | : |
| 114 | : [number] "{eax}" (@as(usize, SYS_sigreturn)) | |
| 114 | : [number] "{eax}" (@enumToInt(SYS.sigreturn)) | |
| 115 | 115 | : "memory" |
| 116 | 116 | ); |
| 117 | 117 | } |
| ... | ... | @@ -119,7 +119,7 @@ pub fn restore() callconv(.Naked) void { |
| 119 | 119 | pub fn restore_rt() callconv(.Naked) void { |
| 120 | 120 | return asm volatile ("int $0x80" |
| 121 | 121 | : |
| 122 | : [number] "{eax}" (@as(usize, SYS_rt_sigreturn)) | |
| 122 | : [number] "{eax}" (@enumToInt(SYS.rt_sigreturn)) | |
| 123 | 123 | : "memory" |
| 124 | 124 | ); |
| 125 | 125 | } |
lib/std/os/linux/mipsel.zig+17-17| ... | ... | @@ -1,13 +1,13 @@ |
| 1 | 1 | usingnamespace @import("../bits.zig"); |
| 2 | 2 | |
| 3 | pub fn syscall0(number: usize) usize { | |
| 3 | pub fn syscall0(number: SYS) usize { | |
| 4 | 4 | return asm volatile ( |
| 5 | 5 | \\ syscall |
| 6 | 6 | \\ blez $7, 1f |
| 7 | 7 | \\ subu $2, $0, $2 |
| 8 | 8 | \\ 1: |
| 9 | 9 | : [ret] "={$2}" (-> usize) |
| 10 | : [number] "{$2}" (number) | |
| 10 | : [number] "{$2}" (@enumToInt(number)) | |
| 11 | 11 | : "memory", "cc", "$7" |
| 12 | 12 | ); |
| 13 | 13 | } |
| ... | ... | @@ -26,46 +26,46 @@ pub fn syscall_pipe(fd: *[2]i32) usize { |
| 26 | 26 | \\ sw $3, 4($4) |
| 27 | 27 | \\ 2: |
| 28 | 28 | : [ret] "={$2}" (-> usize) |
| 29 | : [number] "{$2}" (@as(usize, SYS_pipe)) | |
| 29 | : [number] "{$2}" (@enumToInt(SYS.pipe)) | |
| 30 | 30 | : "memory", "cc", "$7" |
| 31 | 31 | ); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | pub fn syscall1(number: usize, arg1: usize) usize { | |
| 34 | pub fn syscall1(number: SYS, arg1: usize) usize { | |
| 35 | 35 | return asm volatile ( |
| 36 | 36 | \\ syscall |
| 37 | 37 | \\ blez $7, 1f |
| 38 | 38 | \\ subu $2, $0, $2 |
| 39 | 39 | \\ 1: |
| 40 | 40 | : [ret] "={$2}" (-> usize) |
| 41 | : [number] "{$2}" (number), | |
| 41 | : [number] "{$2}" (@enumToInt(number)), | |
| 42 | 42 | [arg1] "{$4}" (arg1) |
| 43 | 43 | : "memory", "cc", "$7" |
| 44 | 44 | ); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | pub fn syscall2(number: usize, arg1: usize, arg2: usize) usize { | |
| 47 | pub fn syscall2(number: SYS, arg1: usize, arg2: usize) usize { | |
| 48 | 48 | return asm volatile ( |
| 49 | 49 | \\ syscall |
| 50 | 50 | \\ blez $7, 1f |
| 51 | 51 | \\ subu $2, $0, $2 |
| 52 | 52 | \\ 1: |
| 53 | 53 | : [ret] "={$2}" (-> usize) |
| 54 | : [number] "{$2}" (number), | |
| 54 | : [number] "{$2}" (@enumToInt(number)), | |
| 55 | 55 | [arg1] "{$4}" (arg1), |
| 56 | 56 | [arg2] "{$5}" (arg2) |
| 57 | 57 | : "memory", "cc", "$7" |
| 58 | 58 | ); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { | |
| 61 | pub fn syscall3(number: SYS, arg1: usize, arg2: usize, arg3: usize) usize { | |
| 62 | 62 | return asm volatile ( |
| 63 | 63 | \\ syscall |
| 64 | 64 | \\ blez $7, 1f |
| 65 | 65 | \\ subu $2, $0, $2 |
| 66 | 66 | \\ 1: |
| 67 | 67 | : [ret] "={$2}" (-> usize) |
| 68 | : [number] "{$2}" (number), | |
| 68 | : [number] "{$2}" (@enumToInt(number)), | |
| 69 | 69 | [arg1] "{$4}" (arg1), |
| 70 | 70 | [arg2] "{$5}" (arg2), |
| 71 | 71 | [arg3] "{$6}" (arg3) |
| ... | ... | @@ -73,14 +73,14 @@ pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { |
| 73 | 73 | ); |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | pub fn syscall4(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usize) usize { | |
| 76 | pub fn syscall4(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize) usize { | |
| 77 | 77 | return asm volatile ( |
| 78 | 78 | \\ syscall |
| 79 | 79 | \\ blez $7, 1f |
| 80 | 80 | \\ subu $2, $0, $2 |
| 81 | 81 | \\ 1: |
| 82 | 82 | : [ret] "={$2}" (-> usize) |
| 83 | : [number] "{$2}" (number), | |
| 83 | : [number] "{$2}" (@enumToInt(number)), | |
| 84 | 84 | [arg1] "{$4}" (arg1), |
| 85 | 85 | [arg2] "{$5}" (arg2), |
| 86 | 86 | [arg3] "{$6}" (arg3), |
| ... | ... | @@ -89,7 +89,7 @@ pub fn syscall4(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 89 | 89 | ); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize { | |
| 92 | pub fn syscall5(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize { | |
| 93 | 93 | return asm volatile ( |
| 94 | 94 | \\ .set noat |
| 95 | 95 | \\ subu $sp, $sp, 24 |
| ... | ... | @@ -100,7 +100,7 @@ pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 100 | 100 | \\ subu $2, $0, $2 |
| 101 | 101 | \\ 1: |
| 102 | 102 | : [ret] "={$2}" (-> usize) |
| 103 | : [number] "{$2}" (number), | |
| 103 | : [number] "{$2}" (@enumToInt(number)), | |
| 104 | 104 | [arg1] "{$4}" (arg1), |
| 105 | 105 | [arg2] "{$5}" (arg2), |
| 106 | 106 | [arg3] "{$6}" (arg3), |
| ... | ... | @@ -111,7 +111,7 @@ pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | pub fn syscall6( |
| 114 | number: usize, | |
| 114 | number: SYS, | |
| 115 | 115 | arg1: usize, |
| 116 | 116 | arg2: usize, |
| 117 | 117 | arg3: usize, |
| ... | ... | @@ -130,7 +130,7 @@ pub fn syscall6( |
| 130 | 130 | \\ subu $2, $0, $2 |
| 131 | 131 | \\ 1: |
| 132 | 132 | : [ret] "={$2}" (-> usize) |
| 133 | : [number] "{$2}" (number), | |
| 133 | : [number] "{$2}" (@enumToInt(number)), | |
| 134 | 134 | [arg1] "{$4}" (arg1), |
| 135 | 135 | [arg2] "{$5}" (arg2), |
| 136 | 136 | [arg3] "{$6}" (arg3), |
| ... | ... | @@ -147,7 +147,7 @@ pub extern fn clone(func: extern fn (arg: usize) u8, stack: usize, flags: u32, a |
| 147 | 147 | pub fn restore() callconv(.Naked) void { |
| 148 | 148 | return asm volatile ("syscall" |
| 149 | 149 | : |
| 150 | : [number] "{$2}" (@as(usize, SYS_sigreturn)) | |
| 150 | : [number] "{$2}" (@enumToInt(SYS.sigreturn)) | |
| 151 | 151 | : "memory", "cc", "$7" |
| 152 | 152 | ); |
| 153 | 153 | } |
| ... | ... | @@ -155,7 +155,7 @@ pub fn restore() callconv(.Naked) void { |
| 155 | 155 | pub fn restore_rt() callconv(.Naked) void { |
| 156 | 156 | return asm volatile ("syscall" |
| 157 | 157 | : |
| 158 | : [number] "{$2}" (@as(usize, SYS_rt_sigreturn)) | |
| 158 | : [number] "{$2}" (@enumToInt(SYS.rt_sigreturn)) | |
| 159 | 159 | : "memory", "cc", "$7" |
| 160 | 160 | ); |
| 161 | 161 | } |
lib/std/os/linux/riscv64.zig+15-15| ... | ... | @@ -1,36 +1,36 @@ |
| 1 | 1 | usingnamespace @import("../bits.zig"); |
| 2 | 2 | |
| 3 | pub fn syscall0(number: usize) usize { | |
| 3 | pub fn syscall0(number: SYS) usize { | |
| 4 | 4 | return asm volatile ("ecall" |
| 5 | 5 | : [ret] "={x10}" (-> usize) |
| 6 | : [number] "{x17}" (number) | |
| 6 | : [number] "{x17}" (@enumToInt(number)) | |
| 7 | 7 | : "memory" |
| 8 | 8 | ); |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | pub fn syscall1(number: usize, arg1: usize) usize { | |
| 11 | pub fn syscall1(number: SYS, arg1: usize) usize { | |
| 12 | 12 | return asm volatile ("ecall" |
| 13 | 13 | : [ret] "={x10}" (-> usize) |
| 14 | : [number] "{x17}" (number), | |
| 14 | : [number] "{x17}" (@enumToInt(number)), | |
| 15 | 15 | [arg1] "{x10}" (arg1) |
| 16 | 16 | : "memory" |
| 17 | 17 | ); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | pub fn syscall2(number: usize, arg1: usize, arg2: usize) usize { | |
| 20 | pub fn syscall2(number: SYS, arg1: usize, arg2: usize) usize { | |
| 21 | 21 | return asm volatile ("ecall" |
| 22 | 22 | : [ret] "={x10}" (-> usize) |
| 23 | : [number] "{x17}" (number), | |
| 23 | : [number] "{x17}" (@enumToInt(number)), | |
| 24 | 24 | [arg1] "{x10}" (arg1), |
| 25 | 25 | [arg2] "{x11}" (arg2) |
| 26 | 26 | : "memory" |
| 27 | 27 | ); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { | |
| 30 | pub fn syscall3(number: SYS, arg1: usize, arg2: usize, arg3: usize) usize { | |
| 31 | 31 | return asm volatile ("ecall" |
| 32 | 32 | : [ret] "={x10}" (-> usize) |
| 33 | : [number] "{x17}" (number), | |
| 33 | : [number] "{x17}" (@enumToInt(number)), | |
| 34 | 34 | [arg1] "{x10}" (arg1), |
| 35 | 35 | [arg2] "{x11}" (arg2), |
| 36 | 36 | [arg3] "{x12}" (arg3) |
| ... | ... | @@ -38,10 +38,10 @@ pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { |
| 38 | 38 | ); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | pub fn syscall4(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usize) usize { | |
| 41 | pub fn syscall4(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize) usize { | |
| 42 | 42 | return asm volatile ("ecall" |
| 43 | 43 | : [ret] "={x10}" (-> usize) |
| 44 | : [number] "{x17}" (number), | |
| 44 | : [number] "{x17}" (@enumToInt(number)), | |
| 45 | 45 | [arg1] "{x10}" (arg1), |
| 46 | 46 | [arg2] "{x11}" (arg2), |
| 47 | 47 | [arg3] "{x12}" (arg3), |
| ... | ... | @@ -50,10 +50,10 @@ pub fn syscall4(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize { | |
| 53 | pub fn syscall5(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize { | |
| 54 | 54 | return asm volatile ("ecall" |
| 55 | 55 | : [ret] "={x10}" (-> usize) |
| 56 | : [number] "{x17}" (number), | |
| 56 | : [number] "{x17}" (@enumToInt(number)), | |
| 57 | 57 | [arg1] "{x10}" (arg1), |
| 58 | 58 | [arg2] "{x11}" (arg2), |
| 59 | 59 | [arg3] "{x12}" (arg3), |
| ... | ... | @@ -64,7 +64,7 @@ pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | pub fn syscall6( |
| 67 | number: usize, | |
| 67 | number: SYS, | |
| 68 | 68 | arg1: usize, |
| 69 | 69 | arg2: usize, |
| 70 | 70 | arg3: usize, |
| ... | ... | @@ -74,7 +74,7 @@ pub fn syscall6( |
| 74 | 74 | ) usize { |
| 75 | 75 | return asm volatile ("ecall" |
| 76 | 76 | : [ret] "={x10}" (-> usize) |
| 77 | : [number] "{x17}" (number), | |
| 77 | : [number] "{x17}" (@enumToInt(number)), | |
| 78 | 78 | [arg1] "{x10}" (arg1), |
| 79 | 79 | [arg2] "{x11}" (arg2), |
| 80 | 80 | [arg3] "{x12}" (arg3), |
| ... | ... | @@ -92,7 +92,7 @@ pub const restore = restore_rt; |
| 92 | 92 | pub fn restore_rt() callconv(.Naked) void { |
| 93 | 93 | return asm volatile ("ecall" |
| 94 | 94 | : |
| 95 | : [number] "{x17}" (@as(usize, SYS_rt_sigreturn)) | |
| 95 | : [number] "{x17}" (@enumToInt(SYS.rt_sigreturn)) | |
| 96 | 96 | : "memory" |
| 97 | 97 | ); |
| 98 | 98 | } |
lib/std/os/linux/tls.zig+4-4| ... | ... | @@ -122,7 +122,7 @@ pub fn setThreadPointer(addr: usize) void { |
| 122 | 122 | .seg_not_present = 0, |
| 123 | 123 | .useable = 1, |
| 124 | 124 | }; |
| 125 | const rc = std.os.linux.syscall1(std.os.linux.SYS_set_thread_area, @ptrToInt(&user_desc)); | |
| 125 | const rc = std.os.linux.syscall1(.set_thread_area, @ptrToInt(&user_desc)); | |
| 126 | 126 | assert(rc == 0); |
| 127 | 127 | |
| 128 | 128 | const gdt_entry_number = user_desc.entry_number; |
| ... | ... | @@ -135,7 +135,7 @@ pub fn setThreadPointer(addr: usize) void { |
| 135 | 135 | ); |
| 136 | 136 | }, |
| 137 | 137 | .x86_64 => { |
| 138 | const rc = std.os.linux.syscall2(std.os.linux.SYS_arch_prctl, std.os.linux.ARCH_SET_FS, addr); | |
| 138 | const rc = std.os.linux.syscall2(.arch_prctl, std.os.linux.ARCH_SET_FS, addr); | |
| 139 | 139 | assert(rc == 0); |
| 140 | 140 | }, |
| 141 | 141 | .aarch64 => { |
| ... | ... | @@ -146,7 +146,7 @@ pub fn setThreadPointer(addr: usize) void { |
| 146 | 146 | ); |
| 147 | 147 | }, |
| 148 | 148 | .arm => { |
| 149 | const rc = std.os.linux.syscall1(std.os.linux.SYS_set_tls, addr); | |
| 149 | const rc = std.os.linux.syscall1(.set_tls, addr); | |
| 150 | 150 | assert(rc == 0); |
| 151 | 151 | }, |
| 152 | 152 | .riscv64 => { |
| ... | ... | @@ -157,7 +157,7 @@ pub fn setThreadPointer(addr: usize) void { |
| 157 | 157 | ); |
| 158 | 158 | }, |
| 159 | 159 | .mipsel => { |
| 160 | const rc = std.os.linux.syscall1(std.os.linux.SYS_set_thread_area, addr); | |
| 160 | const rc = std.os.linux.syscall1(.set_thread_area, addr); | |
| 161 | 161 | assert(rc == 0); |
| 162 | 162 | }, |
| 163 | 163 | else => @compileError("Unsupported architecture"), |
lib/std/os/linux/x86_64.zig+15-15| ... | ... | @@ -1,36 +1,36 @@ |
| 1 | 1 | usingnamespace @import("../bits.zig"); |
| 2 | 2 | |
| 3 | pub fn syscall0(number: usize) usize { | |
| 3 | pub fn syscall0(number: SYS) usize { | |
| 4 | 4 | return asm volatile ("syscall" |
| 5 | 5 | : [ret] "={rax}" (-> usize) |
| 6 | : [number] "{rax}" (number) | |
| 6 | : [number] "{rax}" (@enumToInt(number)) | |
| 7 | 7 | : "rcx", "r11", "memory" |
| 8 | 8 | ); |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | pub fn syscall1(number: usize, arg1: usize) usize { | |
| 11 | pub fn syscall1(number: SYS, arg1: usize) usize { | |
| 12 | 12 | return asm volatile ("syscall" |
| 13 | 13 | : [ret] "={rax}" (-> usize) |
| 14 | : [number] "{rax}" (number), | |
| 14 | : [number] "{rax}" (@enumToInt(number)), | |
| 15 | 15 | [arg1] "{rdi}" (arg1) |
| 16 | 16 | : "rcx", "r11", "memory" |
| 17 | 17 | ); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | pub fn syscall2(number: usize, arg1: usize, arg2: usize) usize { | |
| 20 | pub fn syscall2(number: SYS, arg1: usize, arg2: usize) usize { | |
| 21 | 21 | return asm volatile ("syscall" |
| 22 | 22 | : [ret] "={rax}" (-> usize) |
| 23 | : [number] "{rax}" (number), | |
| 23 | : [number] "{rax}" (@enumToInt(number)), | |
| 24 | 24 | [arg1] "{rdi}" (arg1), |
| 25 | 25 | [arg2] "{rsi}" (arg2) |
| 26 | 26 | : "rcx", "r11", "memory" |
| 27 | 27 | ); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { | |
| 30 | pub fn syscall3(number: SYS, arg1: usize, arg2: usize, arg3: usize) usize { | |
| 31 | 31 | return asm volatile ("syscall" |
| 32 | 32 | : [ret] "={rax}" (-> usize) |
| 33 | : [number] "{rax}" (number), | |
| 33 | : [number] "{rax}" (@enumToInt(number)), | |
| 34 | 34 | [arg1] "{rdi}" (arg1), |
| 35 | 35 | [arg2] "{rsi}" (arg2), |
| 36 | 36 | [arg3] "{rdx}" (arg3) |
| ... | ... | @@ -38,10 +38,10 @@ pub fn syscall3(number: usize, arg1: usize, arg2: usize, arg3: usize) usize { |
| 38 | 38 | ); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | pub fn syscall4(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usize) usize { | |
| 41 | pub fn syscall4(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize) usize { | |
| 42 | 42 | return asm volatile ("syscall" |
| 43 | 43 | : [ret] "={rax}" (-> usize) |
| 44 | : [number] "{rax}" (number), | |
| 44 | : [number] "{rax}" (@enumToInt(number)), | |
| 45 | 45 | [arg1] "{rdi}" (arg1), |
| 46 | 46 | [arg2] "{rsi}" (arg2), |
| 47 | 47 | [arg3] "{rdx}" (arg3), |
| ... | ... | @@ -50,10 +50,10 @@ pub fn syscall4(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 50 | 50 | ); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize { | |
| 53 | pub fn syscall5(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize, arg5: usize) usize { | |
| 54 | 54 | return asm volatile ("syscall" |
| 55 | 55 | : [ret] "={rax}" (-> usize) |
| 56 | : [number] "{rax}" (number), | |
| 56 | : [number] "{rax}" (@enumToInt(number)), | |
| 57 | 57 | [arg1] "{rdi}" (arg1), |
| 58 | 58 | [arg2] "{rsi}" (arg2), |
| 59 | 59 | [arg3] "{rdx}" (arg3), |
| ... | ... | @@ -64,7 +64,7 @@ pub fn syscall5(number: usize, arg1: usize, arg2: usize, arg3: usize, arg4: usiz |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | pub fn syscall6( |
| 67 | number: usize, | |
| 67 | number: SYS, | |
| 68 | 68 | arg1: usize, |
| 69 | 69 | arg2: usize, |
| 70 | 70 | arg3: usize, |
| ... | ... | @@ -74,7 +74,7 @@ pub fn syscall6( |
| 74 | 74 | ) usize { |
| 75 | 75 | return asm volatile ("syscall" |
| 76 | 76 | : [ret] "={rax}" (-> usize) |
| 77 | : [number] "{rax}" (number), | |
| 77 | : [number] "{rax}" (@enumToInt(number)), | |
| 78 | 78 | [arg1] "{rdi}" (arg1), |
| 79 | 79 | [arg2] "{rsi}" (arg2), |
| 80 | 80 | [arg3] "{rdx}" (arg3), |
| ... | ... | @@ -93,7 +93,7 @@ pub const restore = restore_rt; |
| 93 | 93 | pub fn restore_rt() callconv(.Naked) void { |
| 94 | 94 | return asm volatile ("syscall" |
| 95 | 95 | : |
| 96 | : [number] "{rax}" (@as(usize, SYS_rt_sigreturn)) | |
| 96 | : [number] "{rax}" (@enumToInt(SYS.rt_sigreturn)) | |
| 97 | 97 | : "rcx", "r11", "memory" |
| 98 | 98 | ); |
| 99 | 99 | } |
lib/std/special/compiler_rt/clear_cache.zig+1-1| ... | ... | @@ -54,7 +54,7 @@ pub fn clear_cache(start: usize, end: usize) callconv(.C) void { |
| 54 | 54 | // sysarch(ARM_SYNC_ICACHE, &arg); |
| 55 | 55 | @compileError("TODO: implement for NetBSD/FreeBSD"); |
| 56 | 56 | } else if (os == .linux) { |
| 57 | const result = std.os.linux.syscall3(std.os.linux.SYS_cacheflush, start, end, 0); | |
| 57 | const result = std.os.linux.syscall3(.cacheflush, start, end, 0); | |
| 58 | 58 | std.debug.assert(result == 0); |
| 59 | 59 | } else { |
| 60 | 60 | @compileError("no __clear_cache implementation available for this target"); |