| ... | ... | @@ -993,7 +993,13 @@ pub const quotactl = @compileError("TODO: quotactl"); |
| 993 | 993 | // gettid |
| 994 | 994 | // pid_t gettid(void); |
| 995 | 995 | // asmlinkage long sys_gettid(void); |
| 996 | | pub const gettid = @compileError("TODO: gettid"); |
| 996 | pub fn gettid() errno.Error!pid_t { |
| 997 | const r = syscall0(.gettid); |
| 998 | return switch (_errno(r)) { |
| 999 | .ok => @intCast(r), |
| 1000 | _ => |c| errno.errorFromInt(@intFromEnum(c)), |
| 1001 | }; |
| 1002 | } |
| 997 | 1003 | |
| 998 | 1004 | // readahead |
| 999 | 1005 | // ssize_t readahead(int fd, off_t offset, size_t count); |