diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-12-31 20:41:30 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-12-31 20:41:30 -0500 |
| commit | 0fb3e6608c160a0cd9db75fe1ba3d5bb7dac8fa8 (patch) | |
| tree | 763b53d7ddba82762ee32f4e7b724ffe9f97103d /lib/std/os/linux.zig | |
| parent | c8c65b0168ae18f8bd8bf8f38590109a30df73a8 (diff) | |
| parent | 0c8ec369f051d616434cff309fe737c52fd98199 (diff) | |
| download | zig-0fb3e6608c160a0cd9db75fe1ba3d5bb7dac8fa8.tar.gz zig-0fb3e6608c160a0cd9db75fe1ba3d5bb7dac8fa8.zip | |
Merge branch 'lun-4-linux-memfd-create'
Closes #3687
Diffstat (limited to 'lib/std/os/linux.zig')
| -rw-r--r-- | lib/std/os/linux.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index d5bab64493..b6030fe2fe 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -1110,6 +1110,10 @@ pub fn io_uring_register(fd: i32, opcode: u32, arg: ?*const c_void, nr_args: u32 return syscall4(SYS_io_uring_register, @bitCast(usize, @as(isize, fd)), opcode, @ptrToInt(arg), nr_args); } +pub fn memfd_create(name: [*:0]const u8, flags: u32) usize { + return syscall2(SYS_memfd_create, @ptrToInt(name), flags); +} + test "" { if (builtin.os == .linux) { _ = @import("linux/test.zig"); |
