| ... | ... | @@ -206,7 +206,13 @@ pub const dup2 = @compileError("TODO: dup2"); |
| 206 | 206 | // pause |
| 207 | 207 | // int pause(void); |
| 208 | 208 | // asmlinkage long sys_pause(void); |
| 209 | | pub const pause = @compileError("TODO: pause"); |
| 209 | pub fn pause() errno.Error!c_int { |
| 210 | const r = syscall0(.pause); |
| 211 | return switch (_errno(r)) { |
| 212 | .ok => @intCast(r), |
| 213 | _ => |c| errno.errorFromInt(@intFromEnum(c)), |
| 214 | }; |
| 215 | } |
| 210 | 216 | |
| 211 | 217 | // nanosleep |
| 212 | 218 | // int nanosleep(const struct timespec *duration, struct timespec *_Nullable rem); |