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;...@@ -52,6 +52,9 @@ pub const AT_STATX_FORCE_SYNC = 0x2000;
52/// - Don't sync attributes with the server52/// - Don't sync attributes with the server
53pub const AT_STATX_DONT_SYNC = 0x4000;53pub const AT_STATX_DONT_SYNC = 0x4000;
5454
55/// Apply to the entire subtree
56pub const AT_RECURSIVE = 0x8000;
57
55pub const FUTEX_WAIT = 0;58pub const FUTEX_WAIT = 0;
56pub const FUTEX_WAKE = 1;59pub const FUTEX_WAKE = 1;
57pub const FUTEX_FD = 2;60pub const FUTEX_FD = 2;
...@@ -1084,7 +1087,8 @@ pub const io_uring_sqe = extern struct {...@@ -1084,7 +1087,8 @@ pub const io_uring_sqe = extern struct {
1084 pub const union1 = extern union {1087 pub const union1 = extern union {
1085 rw_flags: kernel_rwf,1088 rw_flags: kernel_rwf,
1086 fsync_flags: u32,1089 fsync_flags: u32,
1087 poll_event: u16,1090 poll_events: u16,
1091 sync_range_flags: u32,
1088 };1092 };
1089 union1: union1,1093 union1: union1,
1090 user_data: u64,1094 user_data: u64,
...@@ -1100,6 +1104,9 @@ pub const io_uring_sqe = extern struct {...@@ -1100,6 +1104,9 @@ pub const io_uring_sqe = extern struct {
1100/// use fixed fileset1104/// use fixed fileset
1101pub const IOSQE_FIXED_FILE = (1 << 0);1105pub const IOSQE_FIXED_FILE = (1 << 0);
11021106
1107/// issue after inflight IO
1108pub const IOSQE_IO_DRAIN = (1 << 1);
1109
1103pub const IORING_OP_NOP = 0;1110pub const IORING_OP_NOP = 0;
1104pub const IORING_OP_READV = 1;1111pub const IORING_OP_READV = 1;
1105pub const IORING_OP_WRITEV = 2;1112pub const IORING_OP_WRITEV = 2;
...@@ -1108,6 +1115,7 @@ pub const IORING_OP_READ_FIXED = 4;...@@ -1108,6 +1115,7 @@ pub const IORING_OP_READ_FIXED = 4;
1108pub const IORING_OP_WRITE_FIXED = 5;1115pub const IORING_OP_WRITE_FIXED = 5;
1109pub const IORING_OP_POLL_ADD = 6;1116pub const IORING_OP_POLL_ADD = 6;
1110pub const IORING_OP_POLL_REMOVE = 7;1117pub const IORING_OP_POLL_REMOVE = 7;
1118pub const IORING_OP_SYNC_FILE_RANGE = 8;
11111119
1112// io_uring_sqe.fsync_flags1120// io_uring_sqe.fsync_flags
1113pub const IORING_FSYNC_DATASYNC = (1 << 0);1121pub const IORING_FSYNC_DATASYNC = (1 << 0);
...@@ -1135,3 +1143,5 @@ pub const IORING_REGISTER_BUFFERS = 0;...@@ -1135,3 +1143,5 @@ pub const IORING_REGISTER_BUFFERS = 0;
1135pub const IORING_UNREGISTER_BUFFERS = 1;1143pub const IORING_UNREGISTER_BUFFERS = 1;
1136pub const IORING_REGISTER_FILES = 2;1144pub const IORING_REGISTER_FILES = 2;
1137pub const IORING_UNREGISTER_FILES = 3;1145pub 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;...@@ -289,6 +289,12 @@ pub const SYS_pidfd_send_signal = 424;
289pub const SYS_io_uring_setup = 425;289pub const SYS_io_uring_setup = 425;
290pub const SYS_io_uring_enter = 426;290pub const SYS_io_uring_enter = 426;
291pub const SYS_io_uring_register = 427;291pub 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
293pub const O_CREAT = 0o100;299pub const O_CREAT = 0o100;
294pub const O_EXCL = 0o200;300pub const O_EXCL = 0o200;
std/os/bits/linux/x86_64.zig+6
...@@ -352,6 +352,12 @@ pub const SYS_pidfd_send_signal = 424;...@@ -352,6 +352,12 @@ pub const SYS_pidfd_send_signal = 424;
352pub const SYS_io_uring_setup = 425;352pub const SYS_io_uring_setup = 425;
353pub const SYS_io_uring_enter = 426;353pub const SYS_io_uring_enter = 426;
354pub const SYS_io_uring_register = 427;354pub 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
356pub const O_CREAT = 0o100;362pub const O_CREAT = 0o100;
357pub const O_EXCL = 0o200;363pub const O_EXCL = 0o200;