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");...@@ -865,7 +865,13 @@ pub const mlockall = @compileError("TODO: mlockall");
865// munlockall865// munlockall
866// int munlockall(void);866// int munlockall(void);
867// asmlinkage long sys_munlockall(void);867// 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
870// vhangup876// vhangup
871// int vhangup(void);877// int vhangup(void);
test.zig+1
...@@ -19,4 +19,5 @@ test {...@@ -19,4 +19,5 @@ test {
19 _ = &linux.getppid;19 _ = &linux.getppid;
20 _ = &linux.getpgrp;20 _ = &linux.getpgrp;
21 _ = &linux.setsid;21 _ = &linux.setsid;
22 _ = &linux.munlockall;
22}23}