From 20f4be4cf9953f97db8ebb302fa0e22c78d39432 Mon Sep 17 00:00:00 2001 From: reokodoku Date: Wed, 14 Aug 2024 21:14:49 +0200 Subject: [PATCH] std.os.linux: add mseal syscall --- lib/std/os/linux.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index 67468641c95eb02a2fb29f01df4c70465035cc4b..54ad53fe064370eb0562c594144d467122c6cee9 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -874,6 +874,11 @@ pub const MSF = struct { pub const SYNC = 4; }; +/// Can only be called on 64 bit systems. +pub fn mseal(address: [*]const u8, length: usize, flags: usize) usize { + return syscall3(.mseal, @intFromPtr(address), length, flags); +} + pub fn msync(address: [*]const u8, length: usize, flags: i32) usize { return syscall3(.msync, @intFromPtr(address), length, @as(u32, @bitCast(flags))); } -- 2.54.0