From ae604b446488e2b0931e84c796819d3f817fa66f Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 20 May 2019 23:25:11 +1000 Subject: std: add linux kernel_rwf type and preadv2+pwritev2 --- std/os/bits/linux.zig | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'std/os/bits/linux.zig') diff --git a/std/os/bits/linux.zig b/std/os/bits/linux.zig index 8b323fa572..e2bae50fa1 100644 --- a/std/os/bits/linux.zig +++ b/std/os/bits/linux.zig @@ -119,6 +119,23 @@ pub const O_RDONLY = 0o0; pub const O_WRONLY = 0o1; pub const O_RDWR = 0o2; +pub const kernel_rwf = u32; + +/// high priority request, poll if possible +pub const RWF_HIPRI = kernel_rwf(0x00000001); + +/// per-IO O_DSYNC +pub const RWF_DSYNC = kernel_rwf(0x00000002); + +/// per-IO O_SYNC +pub const RWF_SYNC = kernel_rwf(0x00000004); + +/// per-IO, return -EAGAIN if operation would block +pub const RWF_NOWAIT = kernel_rwf(0x00000008); + +/// per-IO O_APPEND +pub const RWF_APPEND = kernel_rwf(0x00000010); + pub const SEEK_SET = 0; pub const SEEK_CUR = 1; pub const SEEK_END = 2; -- cgit v1.2.3