aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os/bits/linux.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-11-05 17:23:00 -0500
committerGitHub <noreply@github.com>2020-11-05 17:23:00 -0500
commitf85d7199521290121ade4506ea53acdaf6284982 (patch)
treec4d4c4f312b8950a2004ed105f1a5c9479ab78a4 /lib/std/os/bits/linux.zig
parente7b60b219be3885718425d8ddf25d38d3808e90e (diff)
parent8193f558200da27531304b77c1e80c16bb728420 (diff)
downloadzig-f85d7199521290121ade4506ea53acdaf6284982.tar.gz
zig-f85d7199521290121ade4506ea53acdaf6284982.zip
Merge pull request #6895 from jorangreef/fallocate
linux: add fallocate()
Diffstat (limited to 'lib/std/os/bits/linux.zig')
-rw-r--r--lib/std/os/bits/linux.zig21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/std/os/bits/linux.zig b/lib/std/os/bits/linux.zig
index ce9b4a90d1..f53f102c2a 100644
--- a/lib/std/os/bits/linux.zig
+++ b/lib/std/os/bits/linux.zig
@@ -84,6 +84,27 @@ pub const AT_STATX_DONT_SYNC = 0x4000;
/// Apply to the entire subtree
pub const AT_RECURSIVE = 0x8000;
+/// Default is extend size
+pub const FALLOC_FL_KEEP_SIZE = 0x01;
+
+/// De-allocates range
+pub const FALLOC_FL_PUNCH_HOLE = 0x02;
+
+/// Reserved codepoint
+pub const FALLOC_FL_NO_HIDE_STALE = 0x04;
+
+/// Removes a range of a file without leaving a hole in the file
+pub const FALLOC_FL_COLLAPSE_RANGE = 0x08;
+
+/// Converts a range of file to zeros preferably without issuing data IO
+pub const FALLOC_FL_ZERO_RANGE = 0x10;
+
+/// Inserts space within the file size without overwriting any existing data
+pub const FALLOC_FL_INSERT_RANGE = 0x20;
+
+/// Unshares shared blocks within the file size without overwriting any existing data
+pub const FALLOC_FL_UNSHARE_RANGE = 0x40;
+
pub const FUTEX_WAIT = 0;
pub const FUTEX_WAKE = 1;
pub const FUTEX_FD = 2;