Skip to content

Commit 52f0300

Browse files
daurnimatorandrewrk
authored andcommitted
std: add new linux 5.2 constants
1 parent 02b1aea commit 52f0300

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

std/os/bits/linux.zig

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ pub const AT_STATX_FORCE_SYNC = 0x2000;
5252
/// - Don't sync attributes with the server
5353
pub const AT_STATX_DONT_SYNC = 0x4000;
5454

55+
/// Apply to the entire subtree
56+
pub const AT_RECURSIVE = 0x8000;
57+
5558
pub const FUTEX_WAIT = 0;
5659
pub const FUTEX_WAKE = 1;
5760
pub 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
11011105
pub const IOSQE_FIXED_FILE = (1 << 0);
11021106

1107+
/// issue after inflight IO
1108+
pub const IOSQE_IO_DRAIN = (1 << 1);
1109+
11031110
pub const IORING_OP_NOP = 0;
11041111
pub const IORING_OP_READV = 1;
11051112
pub const IORING_OP_WRITEV = 2;
@@ -1108,6 +1115,7 @@ pub const IORING_OP_READ_FIXED = 4;
11081115
pub const IORING_OP_WRITE_FIXED = 5;
11091116
pub const IORING_OP_POLL_ADD = 6;
11101117
pub const IORING_OP_POLL_REMOVE = 7;
1118+
pub const IORING_OP_SYNC_FILE_RANGE = 8;
11111119

11121120
// io_uring_sqe.fsync_flags
11131121
pub const IORING_FSYNC_DATASYNC = (1 << 0);
@@ -1135,3 +1143,5 @@ pub const IORING_REGISTER_BUFFERS = 0;
11351143
pub const IORING_UNREGISTER_BUFFERS = 1;
11361144
pub const IORING_REGISTER_FILES = 2;
11371145
pub const IORING_UNREGISTER_FILES = 3;
1146+
pub const IORING_REGISTER_EVENTFD = 4;
1147+
pub const IORING_UNREGISTER_EVENTFD = 5;

std/os/bits/linux/arm64.zig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ pub const SYS_pidfd_send_signal = 424;
289289
pub const SYS_io_uring_setup = 425;
290290
pub const SYS_io_uring_enter = 426;
291291
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;
292298

293299
pub const O_CREAT = 0o100;
294300
pub const O_EXCL = 0o200;

std/os/bits/linux/x86_64.zig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,12 @@ pub const SYS_pidfd_send_signal = 424;
352352
pub const SYS_io_uring_setup = 425;
353353
pub const SYS_io_uring_enter = 426;
354354
pub const SYS_io_uring_register = 427;
355+
pub const SYS_open_tree = 428;
356+
pub const SYS_move_mount = 429;
357+
pub const SYS_fsopen = 430;
358+
pub const SYS_fsconfig = 431;
359+
pub const SYS_fsmount = 432;
360+
pub const SYS_fspick = 433;
355361

356362
pub const O_CREAT = 0o100;
357363
pub const O_EXCL = 0o200;

0 commit comments

Comments
 (0)