| ... | ... | @@ -917,7 +917,13 @@ pub const chroot = @compileError("TODO: chroot"); |
| 917 | 917 | // sync |
| 918 | 918 | // void sync(void); |
| 919 | 919 | // asmlinkage long sys_sync(void); |
| 920 | | pub const sync = @compileError("TODO: sync"); |
| 920 | pub fn sync() errno.Error!void { |
| 921 | const r = syscall0(.sync); |
| 922 | return switch (_errno(r)) { |
| 923 | .ok => {}, |
| 924 | _ => |c| errno.errorFromInt(@intFromEnum(c)), |
| 925 | }; |
| 926 | } |
| 921 | 927 | |
| 922 | 928 | // acct |
| 923 | 929 | // int acct(const char *_Nullable filename); |