Skip to content

Commit ea776c2

Browse files
committed
Merge branch 'daurnimator-linux-5.3'
closes #3266
2 parents 74d0b5b + aab1ec5 commit ea776c2

File tree

5 files changed

+67
-57
lines changed

5 files changed

+67
-57
lines changed

std/os/bits/linux.zig

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,29 @@ pub const MAP_FIXED = 0x10;
9797
/// don't use a file
9898
pub const MAP_ANONYMOUS = 0x20;
9999

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;
102113

103-
// MAP_ 0x0100 - 0x80000 flags are per architecture
114+
/// perform synchronous page faults for the mapping
115+
pub const MAP_SYNC = 0x80000;
104116

105117
/// MAP_FIXED which doesn't unmap underlying mapping
106118
pub const MAP_FIXED_NOREPLACE = 0x100000;
107119

120+
/// For anonymous mmap, memory could be uninitialized
121+
pub const MAP_UNINITIALIZED = 0x4000000;
122+
108123
pub const F_OK = 0;
109124
pub const X_OK = 1;
110125
pub const W_OK = 2;
@@ -377,16 +392,12 @@ pub const SO_DETACH_FILTER = 27;
377392
pub const SO_GET_FILTER = SO_ATTACH_FILTER;
378393

379394
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;
383396
pub const SO_PEERSEC = 31;
384397
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;
387399
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;
390401
pub const SO_RXQ_OVFL = 40;
391402
pub const SO_WIFI_STATUS = 41;
392403
pub const SCM_WIFI_STATUS = SO_WIFI_STATUS;
@@ -410,6 +421,15 @@ pub const SO_COOKIE = 57;
410421
pub const SCM_TIMESTAMPING_PKTINFO = 58;
411422
pub const SO_PEERGROUPS = 59;
412423
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;
413433

414434
pub const SOL_SOCKET = 1;
415435

@@ -1092,6 +1112,7 @@ pub const io_uring_sqe = extern struct {
10921112
fsync_flags: u32,
10931113
poll_events: u16,
10941114
sync_range_flags: u32,
1115+
msg_flags: u32,
10951116
};
10961117
union1: union1,
10971118
user_data: u64,
@@ -1110,6 +1131,9 @@ pub const IOSQE_FIXED_FILE = (1 << 0);
11101131
/// issue after inflight IO
11111132
pub const IOSQE_IO_DRAIN = (1 << 1);
11121133

1134+
/// links next sqe
1135+
pub const IOSQE_IO_LINK = (1 << 2);
1136+
11131137
pub const IORING_OP_NOP = 0;
11141138
pub const IORING_OP_READV = 1;
11151139
pub const IORING_OP_WRITEV = 2;
@@ -1119,6 +1143,8 @@ pub const IORING_OP_WRITE_FIXED = 5;
11191143
pub const IORING_OP_POLL_ADD = 6;
11201144
pub const IORING_OP_POLL_REMOVE = 7;
11211145
pub const IORING_OP_SYNC_FILE_RANGE = 8;
1146+
pub const IORING_OP_SENDMSG = 9;
1147+
pub const IORING_OP_RECVMSG = 10;
11221148

11231149
// io_uring_sqe.fsync_flags
11241150
pub const IORING_FSYNC_DATASYNC = (1 << 0);

std/os/bits/linux/arm-eabi.zig

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,14 @@ pub const SYS_pidfd_send_signal = 424;
389389
pub const SYS_io_uring_setup = 425;
390390
pub const SYS_io_uring_enter = 426;
391391
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;
392400

393401
pub const SYS_breakpoint = 0x0f0001;
394402
pub const SYS_cacheflush = 0x0f0002;
@@ -455,21 +463,6 @@ pub const MAP_LOCKED = 0x2000;
455463
/// don't check for reservations
456464
pub const MAP_NORESERVE = 0x4000;
457465

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-
473466
pub const VDSO_USEFUL = true;
474467
pub const VDSO_CGT_SYM = "__vdso_clock_gettime";
475468
pub const VDSO_CGT_VER = "LINUX_2.6";

std/os/bits/linux/arm64.zig

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ pub const SYS_fsopen = 430;
295295
pub const SYS_fsconfig = 431;
296296
pub const SYS_fsmount = 432;
297297
pub const SYS_fspick = 433;
298+
pub const SYS_pidfd_open = 434;
299+
pub const SYS_clone3 = 435;
298300

299301
pub const O_CREAT = 0o100;
300302
pub const O_EXCL = 0o200;
@@ -352,21 +354,6 @@ pub const MAP_LOCKED = 0x2000;
352354
/// don't check for reservations
353355
pub const MAP_NORESERVE = 0x4000;
354356

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-
370357
pub const VDSO_USEFUL = true;
371358
pub const VDSO_CGT_SYM = "__kernel_clock_gettime";
372359
pub const VDSO_CGT_VER = "LINUX_2.6.39";

std/os/bits/linux/riscv64.zig

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,10 @@ pub const SYS_rt_tgsigqueueinfo = 240;
243243
pub const SYS_perf_event_open = 241;
244244
pub const SYS_accept4 = 242;
245245
pub const SYS_recvmmsg = 243;
246+
246247
pub const SYS_arch_specific_syscall = 244;
248+
pub const SYS_riscv_flush_icache = SYS_arch_specific_syscall + 15;
249+
247250
pub const SYS_wait4 = 260;
248251
pub const SYS_prlimit64 = 261;
249252
pub const SYS_fanotify_init = 262;
@@ -275,5 +278,19 @@ pub const SYS_pwritev2 = 287;
275278
pub const SYS_pkey_mprotect = 288;
276279
pub const SYS_pkey_alloc = 289;
277280
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

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ pub const SYS_fsopen = 430;
358358
pub const SYS_fsconfig = 431;
359359
pub const SYS_fsmount = 432;
360360
pub const SYS_fspick = 433;
361+
pub const SYS_pidfd_open = 434;
362+
pub const SYS_clone3 = 435;
361363

362364
pub const O_CREAT = 0o100;
363365
pub const O_EXCL = 0o200;
@@ -418,21 +420,6 @@ pub const MAP_LOCKED = 0x2000;
418420
/// don't check for reservations
419421
pub const MAP_NORESERVE = 0x4000;
420422

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-
436423
pub const VDSO_USEFUL = true;
437424
pub const VDSO_CGT_SYM = "__vdso_clock_gettime";
438425
pub const VDSO_CGT_VER = "LINUX_2.6";

0 commit comments

Comments
 (0)