diff --git a/mod.zig b/mod.zig index 8515021af2ec3450cde92d7bbc9eb3a716b38817..f18407b238d231220194c2bbe64ff7783b8b91a6 100644 --- a/mod.zig +++ b/mod.zig @@ -865,7 +865,13 @@ pub const mlockall = @compileError("TODO: mlockall"); // munlockall // int munlockall(void); // asmlinkage long sys_munlockall(void); -pub const munlockall = @compileError("TODO: munlockall"); +pub fn munlockall() errno.Error!c_int { + const r = syscall0(.munlockall); + return switch (_errno(r)) { + .ok => @intCast(r), + _ => |c| errno.errorFromInt(@intFromEnum(c)), + }; +} // vhangup // int vhangup(void); diff --git a/test.zig b/test.zig index 478db29e179388c80ac5380be1ba5185621f3876..52cb51db17fbec727d27262bb271cd9a6895aa53 100644 --- a/test.zig +++ b/test.zig @@ -19,4 +19,5 @@ test { _ = &linux.getppid; _ = &linux.getpgrp; _ = &linux.setsid; + _ = &linux.munlockall; }