| author | |
| committer | |
| log | ea776c287b21286af393a7678240478caa8fa4f5 |
| tree | 6a2bbf78ee5c3222cf6b4ddcb80da9effca6285b |
| parent | 74d0b5bf7c5bdb5013cec7d6eb6b474fe1ad703a |
| parent | aab1ec5c43ffe4a916e4f8e8d0037ac7572cab3c |
| signature |
closes #32665 files changed, 67 insertions(+), 57 deletions(-)
std/os/bits/linux.zig+36-10| ... | ... | @@ -97,14 +97,29 @@ pub const MAP_FIXED = 0x10; |
| 97 | 97 | /// don't use a file |
| 98 | 98 | pub const MAP_ANONYMOUS = 0x20; |
| 99 | 99 | |
| 100 | /// For anonymous mmap, memory could be uninitialized | |
| 101 | pub const MAP_UNINITIALIZED = 0x4000000; | |
| 100 | // MAP_ 0x0100 - 0x4000 flags are per architecture | |
| 101 | ||
| 102 | /// populate (prefault) pagetables | |
| 103 | pub const MAP_POPULATE = 0x8000; | |
| 104 | ||
| 105 | /// do not block on IO | |
| 106 | pub const MAP_NONBLOCK = 0x10000; | |
| 107 | ||
| 108 | /// give out an address that is best suited for process/thread stacks | |
| 109 | pub const MAP_STACK = 0x20000; | |
| 110 | ||
| 111 | /// create a huge page mapping | |
| 112 | pub const MAP_HUGETLB = 0x40000; | |
| 102 | 113 | |
| 103 | // MAP_ 0x0100 - 0x80000 flags are per architecture | |
| 114 | /// perform synchronous page faults for the mapping | |
| 115 | pub const MAP_SYNC = 0x80000; | |
| 104 | 116 | |
| 105 | 117 | /// MAP_FIXED which doesn't unmap underlying mapping |
| 106 | 118 | pub const MAP_FIXED_NOREPLACE = 0x100000; |
| 107 | 119 | |
| 120 | /// For anonymous mmap, memory could be uninitialized | |
| 121 | pub const MAP_UNINITIALIZED = 0x4000000; | |
| 122 | ||
| 108 | 123 | pub const F_OK = 0; |
| 109 | 124 | pub const X_OK = 1; |
| 110 | 125 | pub const W_OK = 2; |
| ... | ... | @@ -377,16 +392,12 @@ pub const SO_DETACH_FILTER = 27; |
| 377 | 392 | pub const SO_GET_FILTER = SO_ATTACH_FILTER; |
| 378 | 393 | |
| 379 | 394 | pub const SO_PEERNAME = 28; |
| 380 | pub const SO_TIMESTAMP = 29; | |
| 381 | pub const SCM_TIMESTAMP = SO_TIMESTAMP; | |
| 382 | ||
| 395 | pub const SO_TIMESTAMP_OLD = 29; | |
| 383 | 396 | pub const SO_PEERSEC = 31; |
| 384 | 397 | pub const SO_PASSSEC = 34; |
| 385 | pub const SO_TIMESTAMPNS = 35; | |
| 386 | pub const SCM_TIMESTAMPNS = SO_TIMESTAMPNS; | |
| 398 | pub const SO_TIMESTAMPNS_OLD = 35; | |
| 387 | 399 | pub const SO_MARK = 36; |
| 388 | pub const SO_TIMESTAMPING = 37; | |
| 389 | pub const SCM_TIMESTAMPING = SO_TIMESTAMPING; | |
| 400 | pub const SO_TIMESTAMPING_OLD = 37; | |
| 390 | 401 | pub const SO_RXQ_OVFL = 40; |
| 391 | 402 | pub const SO_WIFI_STATUS = 41; |
| 392 | 403 | pub const SCM_WIFI_STATUS = SO_WIFI_STATUS; |
| ... | ... | @@ -410,6 +421,15 @@ pub const SO_COOKIE = 57; |
| 410 | 421 | pub const SCM_TIMESTAMPING_PKTINFO = 58; |
| 411 | 422 | pub const SO_PEERGROUPS = 59; |
| 412 | 423 | pub const SO_ZEROCOPY = 60; |
| 424 | pub const SO_TXTIME = 61; | |
| 425 | pub const SCM_TXTIME = SO_TXTIME; | |
| 426 | pub const SO_BINDTOIFINDEX = 62; | |
| 427 | pub const SO_TIMESTAMP_NEW = 63; | |
| 428 | pub const SO_TIMESTAMPNS_NEW = 64; | |
| 429 | pub const SO_TIMESTAMPING_NEW = 65; | |
| 430 | pub const SO_RCVTIMEO_NEW = 66; | |
| 431 | pub const SO_SNDTIMEO_NEW = 67; | |
| 432 | pub const SO_DETACH_REUSEPORT_BPF = 68; | |
| 413 | 433 | |
| 414 | 434 | pub const SOL_SOCKET = 1; |
| 415 | 435 | |
| ... | ... | @@ -1092,6 +1112,7 @@ pub const io_uring_sqe = extern struct { |
| 1092 | 1112 | fsync_flags: u32, |
| 1093 | 1113 | poll_events: u16, |
| 1094 | 1114 | sync_range_flags: u32, |
| 1115 | msg_flags: u32, | |
| 1095 | 1116 | }; |
| 1096 | 1117 | union1: union1, |
| 1097 | 1118 | user_data: u64, |
| ... | ... | @@ -1110,6 +1131,9 @@ pub const IOSQE_FIXED_FILE = (1 << 0); |
| 1110 | 1131 | /// issue after inflight IO |
| 1111 | 1132 | pub const IOSQE_IO_DRAIN = (1 << 1); |
| 1112 | 1133 | |
| 1134 | /// links next sqe | |
| 1135 | pub const IOSQE_IO_LINK = (1 << 2); | |
| 1136 | ||
| 1113 | 1137 | pub const IORING_OP_NOP = 0; |
| 1114 | 1138 | pub const IORING_OP_READV = 1; |
| 1115 | 1139 | pub const IORING_OP_WRITEV = 2; |
| ... | ... | @@ -1119,6 +1143,8 @@ pub const IORING_OP_WRITE_FIXED = 5; |
| 1119 | 1143 | pub const IORING_OP_POLL_ADD = 6; |
| 1120 | 1144 | pub const IORING_OP_POLL_REMOVE = 7; |
| 1121 | 1145 | pub const IORING_OP_SYNC_FILE_RANGE = 8; |
| 1146 | pub const IORING_OP_SENDMSG = 9; | |
| 1147 | pub const IORING_OP_RECVMSG = 10; | |
| 1122 | 1148 | |
| 1123 | 1149 | // io_uring_sqe.fsync_flags |
| 1124 | 1150 | pub const IORING_FSYNC_DATASYNC = (1 << 0); |
std/os/bits/linux/arm-eabi.zig+8-15| ... | ... | @@ -389,6 +389,14 @@ pub const SYS_pidfd_send_signal = 424; |
| 389 | 389 | pub const SYS_io_uring_setup = 425; |
| 390 | 390 | pub const SYS_io_uring_enter = 426; |
| 391 | 391 | pub const SYS_io_uring_register = 427; |
| 392 | pub const SYS_open_tree = 428; | |
| 393 | pub const SYS_move_mount = 429; | |
| 394 | pub const SYS_fsopen = 430; | |
| 395 | pub const SYS_fsconfig = 431; | |
| 396 | pub const SYS_fsmount = 432; | |
| 397 | pub const SYS_fspick = 433; | |
| 398 | pub const SYS_pidfd_open = 434; | |
| 399 | pub const SYS_clone3 = 435; | |
| 392 | 400 | |
| 393 | 401 | pub const SYS_breakpoint = 0x0f0001; |
| 394 | 402 | pub const SYS_cacheflush = 0x0f0002; |
| ... | ... | @@ -455,21 +463,6 @@ pub const MAP_LOCKED = 0x2000; |
| 455 | 463 | /// don't check for reservations |
| 456 | 464 | pub const MAP_NORESERVE = 0x4000; |
| 457 | 465 | |
| 458 | /// populate (prefault) pagetables | |
| 459 | pub const MAP_POPULATE = 0x8000; | |
| 460 | ||
| 461 | /// do not block on IO | |
| 462 | pub const MAP_NONBLOCK = 0x10000; | |
| 463 | ||
| 464 | /// give out an address that is best suited for process/thread stacks | |
| 465 | pub const MAP_STACK = 0x20000; | |
| 466 | ||
| 467 | /// create a huge page mapping | |
| 468 | pub const MAP_HUGETLB = 0x40000; | |
| 469 | ||
| 470 | /// perform synchronous page faults for the mapping | |
| 471 | pub const MAP_SYNC = 0x80000; | |
| 472 | ||
| 473 | 466 | pub const VDSO_USEFUL = true; |
| 474 | 467 | pub const VDSO_CGT_SYM = "__vdso_clock_gettime"; |
| 475 | 468 | pub const VDSO_CGT_VER = "LINUX_2.6"; |
std/os/bits/linux/arm64.zig+2-15| ... | ... | @@ -295,6 +295,8 @@ pub const SYS_fsopen = 430; |
| 295 | 295 | pub const SYS_fsconfig = 431; |
| 296 | 296 | pub const SYS_fsmount = 432; |
| 297 | 297 | pub const SYS_fspick = 433; |
| 298 | pub const SYS_pidfd_open = 434; | |
| 299 | pub const SYS_clone3 = 435; | |
| 298 | 300 | |
| 299 | 301 | pub const O_CREAT = 0o100; |
| 300 | 302 | pub const O_EXCL = 0o200; |
| ... | ... | @@ -352,21 +354,6 @@ pub const MAP_LOCKED = 0x2000; |
| 352 | 354 | /// don't check for reservations |
| 353 | 355 | pub const MAP_NORESERVE = 0x4000; |
| 354 | 356 | |
| 355 | /// populate (prefault) pagetables | |
| 356 | pub const MAP_POPULATE = 0x8000; | |
| 357 | ||
| 358 | /// do not block on IO | |
| 359 | pub const MAP_NONBLOCK = 0x10000; | |
| 360 | ||
| 361 | /// give out an address that is best suited for process/thread stacks | |
| 362 | pub const MAP_STACK = 0x20000; | |
| 363 | ||
| 364 | /// create a huge page mapping | |
| 365 | pub const MAP_HUGETLB = 0x40000; | |
| 366 | ||
| 367 | /// perform synchronous page faults for the mapping | |
| 368 | pub const MAP_SYNC = 0x80000; | |
| 369 | ||
| 370 | 357 | pub const VDSO_USEFUL = true; |
| 371 | 358 | pub const VDSO_CGT_SYM = "__kernel_clock_gettime"; |
| 372 | 359 | pub const VDSO_CGT_VER = "LINUX_2.6.39"; |
std/os/bits/linux/riscv64.zig+19-2| ... | ... | @@ -243,7 +243,10 @@ pub const SYS_rt_tgsigqueueinfo = 240; |
| 243 | 243 | pub const SYS_perf_event_open = 241; |
| 244 | 244 | pub const SYS_accept4 = 242; |
| 245 | 245 | pub const SYS_recvmmsg = 243; |
| 246 | ||
| 246 | 247 | pub const SYS_arch_specific_syscall = 244; |
| 248 | pub const SYS_riscv_flush_icache = SYS_arch_specific_syscall + 15; | |
| 249 | ||
| 247 | 250 | pub const SYS_wait4 = 260; |
| 248 | 251 | pub const SYS_prlimit64 = 261; |
| 249 | 252 | pub const SYS_fanotify_init = 262; |
| ... | ... | @@ -275,5 +278,19 @@ pub const SYS_pwritev2 = 287; |
| 275 | 278 | pub const SYS_pkey_mprotect = 288; |
| 276 | 279 | pub const SYS_pkey_alloc = 289; |
| 277 | 280 | pub const SYS_pkey_free = 290; |
| 278 | pub const SYS_sysriscv = 244; | |
| 279 | pub const SYS_riscv_flush_icache = SYS_sysriscv + 15; | |
| 281 | pub const SYS_statx = 291; | |
| 282 | pub const SYS_io_pgetevents = 292; | |
| 283 | pub const SYS_rseq = 293; | |
| 284 | pub const SYS_kexec_file_load = 294; | |
| 285 | pub const SYS_pidfd_send_signal = 424; | |
| 286 | pub const SYS_io_uring_setup = 425; | |
| 287 | pub const SYS_io_uring_enter = 426; | |
| 288 | pub const SYS_io_uring_register = 427; | |
| 289 | pub const SYS_open_tree = 428; | |
| 290 | pub const SYS_move_mount = 429; | |
| 291 | pub const SYS_fsopen = 430; | |
| 292 | pub const SYS_fsconfig = 431; | |
| 293 | pub const SYS_fsmount = 432; | |
| 294 | pub const SYS_fspick = 433; | |
| 295 | pub const SYS_pidfd_open = 434; | |
| 296 | pub const SYS_clone3 = 435; |
std/os/bits/linux/x86_64.zig+2-15| ... | ... | @@ -358,6 +358,8 @@ pub const SYS_fsopen = 430; |
| 358 | 358 | pub const SYS_fsconfig = 431; |
| 359 | 359 | pub const SYS_fsmount = 432; |
| 360 | 360 | pub const SYS_fspick = 433; |
| 361 | pub const SYS_pidfd_open = 434; | |
| 362 | pub const SYS_clone3 = 435; | |
| 361 | 363 | |
| 362 | 364 | pub const O_CREAT = 0o100; |
| 363 | 365 | pub const O_EXCL = 0o200; |
| ... | ... | @@ -418,21 +420,6 @@ pub const MAP_LOCKED = 0x2000; |
| 418 | 420 | /// don't check for reservations |
| 419 | 421 | pub const MAP_NORESERVE = 0x4000; |
| 420 | 422 | |
| 421 | /// populate (prefault) pagetables | |
| 422 | pub const MAP_POPULATE = 0x8000; | |
| 423 | ||
| 424 | /// do not block on IO | |
| 425 | pub const MAP_NONBLOCK = 0x10000; | |
| 426 | ||
| 427 | /// give out an address that is best suited for process/thread stacks | |
| 428 | pub const MAP_STACK = 0x20000; | |
| 429 | ||
| 430 | /// create a huge page mapping | |
| 431 | pub const MAP_HUGETLB = 0x40000; | |
| 432 | ||
| 433 | /// perform synchronous page faults for the mapping | |
| 434 | pub const MAP_SYNC = 0x80000; | |
| 435 | ||
| 436 | 423 | pub const VDSO_USEFUL = true; |
| 437 | 424 | pub const VDSO_CGT_SYM = "__vdso_clock_gettime"; |
| 438 | 425 | pub const VDSO_CGT_VER = "LINUX_2.6"; |