authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-08-24 02:42:13 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-08-24 02:42:13 -07:00
log264054e3fa57b2eb8e18078bf5cd88e5a96984af
tree11a1210b748ff5ff2a9a8963c23699fb6d90d14e
parent27014a22ec2b852a8b17387877dc531ed2fe098b

these don't set errno


1 files changed, 4 insertions(+), 12 deletions(-)

mod.zig+4-12
......@@ -241,12 +241,8 @@ pub const setitimer = @compileError("TODO: setitimer");
241241// getpid
242242// pid_t getpid(void);
243243// asmlinkage long sys_getpid(void);
244pub fn getpid() errno.Error!pid_t {
245 const r = syscall0(.getpid);
246 return switch (_errno(r)) {
247 .ok => @intCast(r),
248 _ => |c| errno.errorFromInt(@intFromEnum(c)),
249 };
244pub fn getpid() pid_t {
245 return @intCast(syscall0(.getpid));
250246}
251247
252248// sendfile
......@@ -994,12 +990,8 @@ pub const quotactl = @compileError("TODO: quotactl");
994990// gettid
995991// pid_t gettid(void);
996992// asmlinkage long sys_gettid(void);
997pub fn gettid() errno.Error!pid_t {
998 const r = syscall0(.gettid);
999 return switch (_errno(r)) {
1000 .ok => @intCast(r),
1001 _ => |c| errno.errorFromInt(@intFromEnum(c)),
1002 };
993pub fn gettid() pid_t {
994 return @intCast(syscall0(.gettid));
1003995}
1004996
1005997// readahead