authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-04-20 16:45:02 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-04-20 16:45:02 -07:00
logb1fb15a7e0152c8d49fe4d8cba1e6c534fce8400
treed501e35d292eb06bcfb259cab2159a12c76e60e0
parent3b7a77f69a6471fbe9847934c10644d07427d17c

add munlockall


2 files changed, 8 insertions(+), 1 deletions(-)

mod.zig+7-1
......@@ -865,7 +865,13 @@ pub const mlockall = @compileError("TODO: mlockall");
865865// munlockall
866866// int munlockall(void);
867867// asmlinkage long sys_munlockall(void);
868pub const munlockall = @compileError("TODO: munlockall");
868pub fn munlockall() errno.Error!c_int {
869 const r = syscall0(.munlockall);
870 return switch (_errno(r)) {
871 .ok => @intCast(r),
872 _ => |c| errno.errorFromInt(@intFromEnum(c)),
873 };
874}
869875
870876// vhangup
871877// int vhangup(void);
test.zig+1
......@@ -19,4 +19,5 @@ test {
1919 _ = &linux.getppid;
2020 _ = &linux.getpgrp;
2121 _ = &linux.setsid;
22 _ = &linux.munlockall;
2223}