authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2019-07-07 14:29:21+10:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-07-12 11:52:32-04:00
log52f0300505a3b0b9697c61cbf1356c40d8f0dd0a
treec5cbf0e6364fbedba54239df113be2e5567c3992
parent02b1aea291acc8bfdbe72146ef2bf1748d0a6996

std: add new linux 5.2 constants


3 files changed, 23 insertions(+), 1 deletions(-)

std/os/bits/linux.zig+11-1
......@@ -52,6 +52,9 @@ pub const AT_STATX_FORCE_SYNC = 0x2000;
5252/// - Don't sync attributes with the server
5353pub const AT_STATX_DONT_SYNC = 0x4000;
5454
55/// Apply to the entire subtree
56pub const AT_RECURSIVE = 0x8000;
57
5558pub const FUTEX_WAIT = 0;
5659pub const FUTEX_WAKE = 1;
5760pub const FUTEX_FD = 2;
......@@ -1084,7 +1087,8 @@ pub const io_uring_sqe = extern struct {
10841087 pub const union1 = extern union {
10851088 rw_flags: kernel_rwf,
10861089 fsync_flags: u32,
1087 poll_event: u16,
1090 poll_events: u16,
1091 sync_range_flags: u32,
10881092 };
10891093 union1: union1,
10901094 user_data: u64,
......@@ -1100,6 +1104,9 @@ pub const io_uring_sqe = extern struct {
11001104/// use fixed fileset
11011105pub const IOSQE_FIXED_FILE = (1 << 0);
11021106
1107/// issue after inflight IO
1108pub const IOSQE_IO_DRAIN = (1 << 1);
1109
11031110pub const IORING_OP_NOP = 0;
11041111pub const IORING_OP_READV = 1;
11051112pub const IORING_OP_WRITEV = 2;
......@@ -1108,6 +1115,7 @@ pub const IORING_OP_READ_FIXED = 4;
11081115pub const IORING_OP_WRITE_FIXED = 5;
11091116pub const IORING_OP_POLL_ADD = 6;
11101117pub const IORING_OP_POLL_REMOVE = 7;
1118pub const IORING_OP_SYNC_FILE_RANGE = 8;
11111119
11121120// io_uring_sqe.fsync_flags
11131121pub const IORING_FSYNC_DATASYNC = (1 << 0);
......@@ -1135,3 +1143,5 @@ pub const IORING_REGISTER_BUFFERS = 0;
11351143pub const IORING_UNREGISTER_BUFFERS = 1;
11361144pub const IORING_REGISTER_FILES = 2;
11371145pub const IORING_UNREGISTER_FILES = 3;
1146pub const IORING_REGISTER_EVENTFD = 4;
1147pub const IORING_UNREGISTER_EVENTFD = 5;
std/os/bits/linux/arm64.zig+6
......@@ -289,6 +289,12 @@ pub const SYS_pidfd_send_signal = 424;
289289pub const SYS_io_uring_setup = 425;
290290pub const SYS_io_uring_enter = 426;
291291pub const SYS_io_uring_register = 427;
292pub const SYS_open_tree = 428;
293pub const SYS_move_mount = 429;
294pub const SYS_fsopen = 430;
295pub const SYS_fsconfig = 431;
296pub const SYS_fsmount = 432;
297pub const SYS_fspick = 433;
292298
293299pub const O_CREAT = 0o100;
294300pub const O_EXCL = 0o200;
std/os/bits/linux/x86_64.zig+6
......@@ -352,6 +352,12 @@ pub const SYS_pidfd_send_signal = 424;
352352pub const SYS_io_uring_setup = 425;
353353pub const SYS_io_uring_enter = 426;
354354pub const SYS_io_uring_register = 427;
355pub const SYS_open_tree = 428;
356pub const SYS_move_mount = 429;
357pub const SYS_fsopen = 430;
358pub const SYS_fsconfig = 431;
359pub const SYS_fsmount = 432;
360pub const SYS_fspick = 433;
355361
356362pub const O_CREAT = 0o100;
357363pub const O_EXCL = 0o200;