Skip to content

Commit

Permalink
std.os.linux: add mseal syscall
Browse files Browse the repository at this point in the history
  • Loading branch information
Reokodoku committed Aug 14, 2024
1 parent ae5bf2f commit 5c84d36
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/std/os/linux.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}
Expand Down

0 comments on commit 5c84d36

Please sign in to comment.