| ... | ... | @@ -216,13 +216,6 @@ const Thread = struct { |
| 216 | 216 | ) orelse return; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | | fn endSyscallCanceled(thread: *Thread) Io.Cancelable { |
| 220 | | if (thread.current_closure) |closure| { |
| 221 | | @atomicStore(CancelStatus, &closure.cancel_status, .acknowledged, .release); |
| 222 | | } |
| 223 | | return error.Canceled; |
| 224 | | } |
| 225 | | |
| 226 | 219 | fn currentSignalId() SignaleeId { |
| 227 | 220 | return if (std.Thread.use_pthreads) std.c.pthread_self() else std.Thread.getCurrentId(); |
| 228 | 221 | } |
| ... | ... | @@ -1531,7 +1524,6 @@ fn dirCreateDirPosix(userdata: ?*anyopaque, dir: Dir, sub_path: []const u8, perm |
| 1531 | 1524 | try current_thread.checkCancel(); |
| 1532 | 1525 | continue; |
| 1533 | 1526 | }, |
| 1534 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 1535 | 1527 | else => |e| { |
| 1536 | 1528 | current_thread.endSyscall(); |
| 1537 | 1529 | switch (e) { |
| ... | ... | @@ -1574,7 +1566,6 @@ fn dirCreateDirWasi(userdata: ?*anyopaque, dir: Dir, sub_path: []const u8, permi |
| 1574 | 1566 | try current_thread.checkCancel(); |
| 1575 | 1567 | continue; |
| 1576 | 1568 | }, |
| 1577 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 1578 | 1569 | else => |e| { |
| 1579 | 1570 | current_thread.endSyscall(); |
| 1580 | 1571 | switch (e) { |
| ... | ... | @@ -1875,7 +1866,6 @@ fn dirStatFileLinux( |
| 1875 | 1866 | try current_thread.checkCancel(); |
| 1876 | 1867 | continue; |
| 1877 | 1868 | }, |
| 1878 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 1879 | 1869 | else => |e| { |
| 1880 | 1870 | current_thread.endSyscall(); |
| 1881 | 1871 | switch (e) { |
| ... | ... | @@ -1925,7 +1915,6 @@ fn posixStatFile(current_thread: *Thread, dir_fd: posix.fd_t, sub_path: [:0]cons |
| 1925 | 1915 | try current_thread.checkCancel(); |
| 1926 | 1916 | continue; |
| 1927 | 1917 | }, |
| 1928 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 1929 | 1918 | else => |e| { |
| 1930 | 1919 | current_thread.endSyscall(); |
| 1931 | 1920 | switch (e) { |
| ... | ... | @@ -1986,7 +1975,6 @@ fn dirStatFileWasi( |
| 1986 | 1975 | try current_thread.checkCancel(); |
| 1987 | 1976 | continue; |
| 1988 | 1977 | }, |
| 1989 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 1990 | 1978 | else => |e| { |
| 1991 | 1979 | current_thread.endSyscall(); |
| 1992 | 1980 | switch (e) { |
| ... | ... | @@ -2026,7 +2014,6 @@ fn fileLength(userdata: ?*anyopaque, file: File) File.LengthError!u64 { |
| 2026 | 2014 | try current_thread.checkCancel(); |
| 2027 | 2015 | continue; |
| 2028 | 2016 | }, |
| 2029 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2030 | 2017 | else => |e| { |
| 2031 | 2018 | current_thread.endSyscall(); |
| 2032 | 2019 | switch (e) { |
| ... | ... | @@ -2077,7 +2064,6 @@ fn fileStatPosix(userdata: ?*anyopaque, file: File) File.StatError!File.Stat { |
| 2077 | 2064 | try current_thread.checkCancel(); |
| 2078 | 2065 | continue; |
| 2079 | 2066 | }, |
| 2080 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2081 | 2067 | else => |e| { |
| 2082 | 2068 | current_thread.endSyscall(); |
| 2083 | 2069 | switch (e) { |
| ... | ... | @@ -2130,7 +2116,6 @@ fn fileStatLinux(userdata: ?*anyopaque, file: File) File.StatError!File.Stat { |
| 2130 | 2116 | try current_thread.checkCancel(); |
| 2131 | 2117 | continue; |
| 2132 | 2118 | }, |
| 2133 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2134 | 2119 | else => |e| { |
| 2135 | 2120 | current_thread.endSyscall(); |
| 2136 | 2121 | switch (e) { |
| ... | ... | @@ -2215,7 +2200,6 @@ fn fileStatWasi(userdata: ?*anyopaque, file: File) File.StatError!File.Stat { |
| 2215 | 2200 | try current_thread.checkCancel(); |
| 2216 | 2201 | continue; |
| 2217 | 2202 | }, |
| 2218 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2219 | 2203 | else => |e| { |
| 2220 | 2204 | current_thread.endSyscall(); |
| 2221 | 2205 | switch (e) { |
| ... | ... | @@ -2267,7 +2251,6 @@ fn dirAccessPosix( |
| 2267 | 2251 | try current_thread.checkCancel(); |
| 2268 | 2252 | continue; |
| 2269 | 2253 | }, |
| 2270 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2271 | 2254 | else => |e| { |
| 2272 | 2255 | current_thread.endSyscall(); |
| 2273 | 2256 | switch (e) { |
| ... | ... | @@ -2317,7 +2300,6 @@ fn dirAccessWasi( |
| 2317 | 2300 | try current_thread.checkCancel(); |
| 2318 | 2301 | continue; |
| 2319 | 2302 | }, |
| 2320 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2321 | 2303 | else => |e| { |
| 2322 | 2304 | current_thread.endSyscall(); |
| 2323 | 2305 | switch (e) { |
| ... | ... | @@ -2464,7 +2446,6 @@ fn dirCreateFilePosix( |
| 2464 | 2446 | try current_thread.checkCancel(); |
| 2465 | 2447 | continue; |
| 2466 | 2448 | }, |
| 2467 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2468 | 2449 | else => |e| { |
| 2469 | 2450 | current_thread.endSyscall(); |
| 2470 | 2451 | switch (e) { |
| ... | ... | @@ -2519,7 +2500,6 @@ fn dirCreateFilePosix( |
| 2519 | 2500 | try current_thread.checkCancel(); |
| 2520 | 2501 | continue; |
| 2521 | 2502 | }, |
| 2522 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2523 | 2503 | else => |e| { |
| 2524 | 2504 | current_thread.endSyscall(); |
| 2525 | 2505 | switch (e) { |
| ... | ... | @@ -2686,7 +2666,6 @@ fn dirCreateFileWasi( |
| 2686 | 2666 | try current_thread.checkCancel(); |
| 2687 | 2667 | continue; |
| 2688 | 2668 | }, |
| 2689 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2690 | 2669 | else => |e| { |
| 2691 | 2670 | current_thread.endSyscall(); |
| 2692 | 2671 | switch (e) { |
| ... | ... | @@ -2783,7 +2762,6 @@ fn dirOpenFilePosix( |
| 2783 | 2762 | try current_thread.checkCancel(); |
| 2784 | 2763 | continue; |
| 2785 | 2764 | }, |
| 2786 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2787 | 2765 | else => |e| { |
| 2788 | 2766 | current_thread.endSyscall(); |
| 2789 | 2767 | switch (e) { |
| ... | ... | @@ -2849,7 +2827,6 @@ fn dirOpenFilePosix( |
| 2849 | 2827 | try current_thread.checkCancel(); |
| 2850 | 2828 | continue; |
| 2851 | 2829 | }, |
| 2852 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2853 | 2830 | else => |e| { |
| 2854 | 2831 | current_thread.endSyscall(); |
| 2855 | 2832 | switch (e) { |
| ... | ... | @@ -2878,7 +2855,6 @@ fn dirOpenFilePosix( |
| 2878 | 2855 | try current_thread.checkCancel(); |
| 2879 | 2856 | continue; |
| 2880 | 2857 | }, |
| 2881 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2882 | 2858 | else => |err| { |
| 2883 | 2859 | current_thread.endSyscall(); |
| 2884 | 2860 | return posix.unexpectedErrno(err); |
| ... | ... | @@ -2899,7 +2875,6 @@ fn dirOpenFilePosix( |
| 2899 | 2875 | try current_thread.checkCancel(); |
| 2900 | 2876 | continue; |
| 2901 | 2877 | }, |
| 2902 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 2903 | 2878 | else => |err| { |
| 2904 | 2879 | current_thread.endSyscall(); |
| 2905 | 2880 | return posix.unexpectedErrno(err); |
| ... | ... | @@ -3104,7 +3079,6 @@ fn dirOpenFileWasi( |
| 3104 | 3079 | try current_thread.checkCancel(); |
| 3105 | 3080 | continue; |
| 3106 | 3081 | }, |
| 3107 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 3108 | 3082 | else => |e| { |
| 3109 | 3083 | current_thread.endSyscall(); |
| 3110 | 3084 | switch (e) { |
| ... | ... | @@ -3203,7 +3177,6 @@ fn dirOpenDirPosix( |
| 3203 | 3177 | try current_thread.checkCancel(); |
| 3204 | 3178 | continue; |
| 3205 | 3179 | }, |
| 3206 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 3207 | 3180 | else => |e| { |
| 3208 | 3181 | current_thread.endSyscall(); |
| 3209 | 3182 | switch (e) { |
| ... | ... | @@ -3256,7 +3229,6 @@ fn dirOpenDirHaiku( |
| 3256 | 3229 | try current_thread.checkCancel(); |
| 3257 | 3230 | continue; |
| 3258 | 3231 | }, |
| 3259 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 3260 | 3232 | else => |e| { |
| 3261 | 3233 | current_thread.endSyscall(); |
| 3262 | 3234 | switch (e) { |
| ... | ... | @@ -3398,7 +3370,6 @@ fn dirReadLinux(userdata: ?*anyopaque, dr: *Dir.Reader, buffer: []Dir.Entry) Dir |
| 3398 | 3370 | try current_thread.checkCancel(); |
| 3399 | 3371 | continue; |
| 3400 | 3372 | }, |
| 3401 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 3402 | 3373 | else => |e| { |
| 3403 | 3374 | current_thread.endSyscall(); |
| 3404 | 3375 | switch (e) { |
| ... | ... | @@ -3508,7 +3479,6 @@ fn dirReadDarwin(userdata: ?*anyopaque, dr: *Dir.Reader, buffer: []Dir.Entry) Di |
| 3508 | 3479 | try current_thread.checkCancel(); |
| 3509 | 3480 | continue; |
| 3510 | 3481 | }, |
| 3511 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 3512 | 3482 | else => |e| { |
| 3513 | 3483 | current_thread.endSyscall(); |
| 3514 | 3484 | switch (e) { |
| ... | ... | @@ -3585,7 +3555,6 @@ fn dirReadBsd(userdata: ?*anyopaque, dr: *Dir.Reader, buffer: []Dir.Entry) Dir.R |
| 3585 | 3555 | try current_thread.checkCancel(); |
| 3586 | 3556 | continue; |
| 3587 | 3557 | }, |
| 3588 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 3589 | 3558 | else => |e| { |
| 3590 | 3559 | current_thread.endSyscall(); |
| 3591 | 3560 | switch (e) { |
| ... | ... | @@ -3680,7 +3649,6 @@ fn dirReadIllumos(userdata: ?*anyopaque, dr: *Dir.Reader, buffer: []Dir.Entry) D |
| 3680 | 3649 | try current_thread.checkCancel(); |
| 3681 | 3650 | continue; |
| 3682 | 3651 | }, |
| 3683 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 3684 | 3652 | else => |e| { |
| 3685 | 3653 | current_thread.endSyscall(); |
| 3686 | 3654 | switch (e) { |
| ... | ... | @@ -3957,7 +3925,6 @@ fn dirRealPathFilePosix(userdata: ?*anyopaque, dir: Dir, sub_path: []const u8, o |
| 3957 | 3925 | try current_thread.checkCancel(); |
| 3958 | 3926 | continue; |
| 3959 | 3927 | }, |
| 3960 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 3961 | 3928 | else => |e| { |
| 3962 | 3929 | current_thread.endSyscall(); |
| 3963 | 3930 | switch (e) { |
| ... | ... | @@ -4045,7 +4012,6 @@ fn realPathPosix(current_thread: *Thread, fd: posix.fd_t, out_buffer: []u8) File |
| 4045 | 4012 | try current_thread.checkCancel(); |
| 4046 | 4013 | continue; |
| 4047 | 4014 | }, |
| 4048 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 4049 | 4015 | else => |e| { |
| 4050 | 4016 | current_thread.endSyscall(); |
| 4051 | 4017 | switch (e) { |
| ... | ... | @@ -4082,7 +4048,6 @@ fn realPathPosix(current_thread: *Thread, fd: posix.fd_t, out_buffer: []u8) File |
| 4082 | 4048 | try current_thread.checkCancel(); |
| 4083 | 4049 | continue; |
| 4084 | 4050 | }, |
| 4085 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 4086 | 4051 | else => |e| { |
| 4087 | 4052 | current_thread.endSyscall(); |
| 4088 | 4053 | switch (e) { |
| ... | ... | @@ -4115,7 +4080,6 @@ fn realPathPosix(current_thread: *Thread, fd: posix.fd_t, out_buffer: []u8) File |
| 4115 | 4080 | try current_thread.checkCancel(); |
| 4116 | 4081 | continue; |
| 4117 | 4082 | }, |
| 4118 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 4119 | 4083 | else => |e| { |
| 4120 | 4084 | current_thread.endSyscall(); |
| 4121 | 4085 | switch (e) { |
| ... | ... | @@ -4163,7 +4127,6 @@ fn dirDeleteFileWasi(userdata: ?*anyopaque, dir: Dir, sub_path: []const u8) Dir. |
| 4163 | 4127 | try current_thread.checkCancel(); |
| 4164 | 4128 | continue; |
| 4165 | 4129 | }, |
| 4166 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 4167 | 4130 | else => |e| { |
| 4168 | 4131 | current_thread.endSyscall(); |
| 4169 | 4132 | switch (e) { |
| ... | ... | @@ -4208,7 +4171,6 @@ fn dirDeleteFilePosix(userdata: ?*anyopaque, dir: Dir, sub_path: []const u8) Dir |
| 4208 | 4171 | try current_thread.checkCancel(); |
| 4209 | 4172 | continue; |
| 4210 | 4173 | }, |
| 4211 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 4212 | 4174 | // Some systems return permission errors when trying to delete a |
| 4213 | 4175 | // directory, so we need to handle that case specifically and |
| 4214 | 4176 | // translate the error. |
| ... | ... | @@ -4225,7 +4187,6 @@ fn dirDeleteFilePosix(userdata: ?*anyopaque, dir: Dir, sub_path: []const u8) Dir |
| 4225 | 4187 | break; |
| 4226 | 4188 | }, |
| 4227 | 4189 | .INTR => continue, |
| 4228 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 4229 | 4190 | else => { |
| 4230 | 4191 | current_thread.endSyscall(); |
| 4231 | 4192 | return error.PermissionDenied; |
| ... | ... | @@ -4443,7 +4404,6 @@ fn dirDeleteDirWasi(userdata: ?*anyopaque, dir: Dir, sub_path: []const u8) Dir.D |
| 4443 | 4404 | try current_thread.checkCancel(); |
| 4444 | 4405 | continue; |
| 4445 | 4406 | }, |
| 4446 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 4447 | 4407 | else => |e| { |
| 4448 | 4408 | current_thread.endSyscall(); |
| 4449 | 4409 | switch (e) { |
| ... | ... | @@ -4488,7 +4448,6 @@ fn dirDeleteDirPosix(userdata: ?*anyopaque, dir: Dir, sub_path: []const u8) Dir. |
| 4488 | 4448 | try current_thread.checkCancel(); |
| 4489 | 4449 | continue; |
| 4490 | 4450 | }, |
| 4491 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 4492 | 4451 | else => |e| { |
| 4493 | 4452 | current_thread.endSyscall(); |
| 4494 | 4453 | switch (e) { |
| ... | ... | @@ -4654,7 +4613,6 @@ fn dirRenameWasi( |
| 4654 | 4613 | while (true) { |
| 4655 | 4614 | switch (std.os.wasi.path_rename(old_dir.handle, old_sub_path.ptr, old_sub_path.len, new_dir.handle, new_sub_path.ptr, new_sub_path.len)) { |
| 4656 | 4615 | .SUCCESS => return current_thread.endSyscall(), |
| 4657 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 4658 | 4616 | .INTR => { |
| 4659 | 4617 | try current_thread.checkCancel(); |
| 4660 | 4618 | continue; |
| ... | ... | @@ -4709,7 +4667,6 @@ fn dirRenamePosix( |
| 4709 | 4667 | while (true) { |
| 4710 | 4668 | switch (posix.errno(posix.system.renameat(old_dir.handle, old_sub_path_posix, new_dir.handle, new_sub_path_posix))) { |
| 4711 | 4669 | .SUCCESS => return current_thread.endSyscall(), |
| 4712 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 4713 | 4670 | .INTR => { |
| 4714 | 4671 | try current_thread.checkCancel(); |
| 4715 | 4672 | continue; |
| ... | ... | @@ -4890,7 +4847,6 @@ fn dirSymLinkWasi( |
| 4890 | 4847 | while (true) { |
| 4891 | 4848 | switch (std.os.wasi.path_symlink(target_path.ptr, target_path.len, dir.handle, sym_link_path.ptr, sym_link_path.len)) { |
| 4892 | 4849 | .SUCCESS => return current_thread.endSyscall(), |
| 4893 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 4894 | 4850 | .INTR => { |
| 4895 | 4851 | try current_thread.checkCancel(); |
| 4896 | 4852 | continue; |
| ... | ... | @@ -4943,7 +4899,6 @@ fn dirSymLinkPosix( |
| 4943 | 4899 | while (true) { |
| 4944 | 4900 | switch (posix.errno(posix.system.symlinkat(target_path_posix, dir.handle, sym_link_path_posix))) { |
| 4945 | 4901 | .SUCCESS => return current_thread.endSyscall(), |
| 4946 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 4947 | 4902 | .INTR => { |
| 4948 | 4903 | try current_thread.checkCancel(); |
| 4949 | 4904 | continue; |
| ... | ... | @@ -5010,7 +4965,6 @@ fn dirReadLinkWasi(userdata: ?*anyopaque, dir: Dir, sub_path: []const u8, buffer |
| 5010 | 4965 | current_thread.endSyscall(); |
| 5011 | 4966 | return n; |
| 5012 | 4967 | }, |
| 5013 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5014 | 4968 | .INTR => { |
| 5015 | 4969 | try current_thread.checkCancel(); |
| 5016 | 4970 | continue; |
| ... | ... | @@ -5052,7 +5006,6 @@ fn dirReadLinkPosix(userdata: ?*anyopaque, dir: Dir, sub_path: []const u8, buffe |
| 5052 | 5006 | const len: usize = @bitCast(rc); |
| 5053 | 5007 | return len; |
| 5054 | 5008 | }, |
| 5055 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5056 | 5009 | .INTR => { |
| 5057 | 5010 | try current_thread.checkCancel(); |
| 5058 | 5011 | continue; |
| ... | ... | @@ -5137,7 +5090,6 @@ fn posixFchmodat( |
| 5137 | 5090 | posix.system.fchmodat(dir_fd, path, mode); |
| 5138 | 5091 | switch (posix.errno(rc)) { |
| 5139 | 5092 | .SUCCESS => return current_thread.endSyscall(), |
| 5140 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5141 | 5093 | .INTR => { |
| 5142 | 5094 | try current_thread.checkCancel(); |
| 5143 | 5095 | continue; |
| ... | ... | @@ -5176,7 +5128,6 @@ fn posixFchmodat( |
| 5176 | 5128 | while (true) { |
| 5177 | 5129 | switch (std.os.linux.errno(std.os.linux.fchmodat2(dir_fd, path, mode, flags))) { |
| 5178 | 5130 | .SUCCESS => return current_thread.endSyscall(), |
| 5179 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5180 | 5131 | .INTR => { |
| 5181 | 5132 | try current_thread.checkCancel(); |
| 5182 | 5133 | continue; |
| ... | ... | @@ -5252,7 +5203,6 @@ fn posixFchown(current_thread: *Thread, fd: posix.fd_t, uid: posix.uid_t, gid: p |
| 5252 | 5203 | while (true) { |
| 5253 | 5204 | switch (posix.errno(posix.system.fchown(fd, uid, gid))) { |
| 5254 | 5205 | .SUCCESS => return current_thread.endSyscall(), |
| 5255 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5256 | 5206 | .INTR => { |
| 5257 | 5207 | try current_thread.checkCancel(); |
| 5258 | 5208 | continue; |
| ... | ... | @@ -5333,7 +5283,6 @@ fn fileSyncPosix(userdata: ?*anyopaque, file: File) File.SyncError!void { |
| 5333 | 5283 | while (true) { |
| 5334 | 5284 | switch (posix.errno(posix.system.fsync(file.handle))) { |
| 5335 | 5285 | .SUCCESS => return current_thread.endSyscall(), |
| 5336 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5337 | 5286 | .INTR => { |
| 5338 | 5287 | try current_thread.checkCancel(); |
| 5339 | 5288 | continue; |
| ... | ... | @@ -5361,7 +5310,6 @@ fn fileSyncWasi(userdata: ?*anyopaque, file: File) File.SyncError!void { |
| 5361 | 5310 | while (true) { |
| 5362 | 5311 | switch (std.os.wasi.fd_sync(file.handle)) { |
| 5363 | 5312 | .SUCCESS => return current_thread.endSyscall(), |
| 5364 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5365 | 5313 | .INTR => { |
| 5366 | 5314 | try current_thread.checkCancel(); |
| 5367 | 5315 | continue; |
| ... | ... | @@ -5405,7 +5353,6 @@ fn isTty(current_thread: *Thread, file: File) Io.Cancelable!bool { |
| 5405 | 5353 | current_thread.endSyscall(); |
| 5406 | 5354 | return true; |
| 5407 | 5355 | }, |
| 5408 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5409 | 5356 | .INTR => { |
| 5410 | 5357 | try current_thread.checkCancel(); |
| 5411 | 5358 | continue; |
| ... | ... | @@ -5445,7 +5392,6 @@ fn isTty(current_thread: *Thread, file: File) Io.Cancelable!bool { |
| 5445 | 5392 | current_thread.endSyscall(); |
| 5446 | 5393 | return true; |
| 5447 | 5394 | }, |
| 5448 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5449 | 5395 | .INTR => { |
| 5450 | 5396 | try current_thread.checkCancel(); |
| 5451 | 5397 | continue; |
| ... | ... | @@ -5627,7 +5573,6 @@ fn fileSetLength(userdata: ?*anyopaque, file: File, length: u64) File.SetLengthE |
| 5627 | 5573 | while (true) { |
| 5628 | 5574 | switch (std.os.wasi.fd_filestat_set_size(file.handle, length)) { |
| 5629 | 5575 | .SUCCESS => return current_thread.endSyscall(), |
| 5630 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5631 | 5576 | .INTR => { |
| 5632 | 5577 | try current_thread.checkCancel(); |
| 5633 | 5578 | continue; |
| ... | ... | @@ -5653,7 +5598,6 @@ fn fileSetLength(userdata: ?*anyopaque, file: File, length: u64) File.SetLengthE |
| 5653 | 5598 | while (true) { |
| 5654 | 5599 | switch (posix.errno(ftruncate_sym(file.handle, signed_len))) { |
| 5655 | 5600 | .SUCCESS => return current_thread.endSyscall(), |
| 5656 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5657 | 5601 | .INTR => { |
| 5658 | 5602 | try current_thread.checkCancel(); |
| 5659 | 5603 | continue; |
| ... | ... | @@ -5723,7 +5667,6 @@ fn setPermissionsPosix(current_thread: *Thread, fd: posix.fd_t, mode: posix.mode |
| 5723 | 5667 | while (true) { |
| 5724 | 5668 | switch (posix.errno(posix.system.fchmod(fd, mode))) { |
| 5725 | 5669 | .SUCCESS => return current_thread.endSyscall(), |
| 5726 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5727 | 5670 | .INTR => { |
| 5728 | 5671 | try current_thread.checkCancel(); |
| 5729 | 5672 | continue; |
| ... | ... | @@ -5782,7 +5725,6 @@ fn dirSetTimestamps( |
| 5782 | 5725 | while (true) { |
| 5783 | 5726 | switch (posix.errno(posix.system.utimensat(dir.handle, sub_path_posix, &times, flags))) { |
| 5784 | 5727 | .SUCCESS => return current_thread.endSyscall(), |
| 5785 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5786 | 5728 | .INTR => { |
| 5787 | 5729 | try current_thread.checkCancel(); |
| 5788 | 5730 | continue; |
| ... | ... | @@ -5829,7 +5771,6 @@ fn dirSetTimestampsNow( |
| 5829 | 5771 | while (true) { |
| 5830 | 5772 | switch (posix.errno(posix.system.utimensat(dir.handle, sub_path_posix, null, flags))) { |
| 5831 | 5773 | .SUCCESS => return current_thread.endSyscall(), |
| 5832 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5833 | 5774 | .INTR => { |
| 5834 | 5775 | try current_thread.checkCancel(); |
| 5835 | 5776 | continue; |
| ... | ... | @@ -5890,7 +5831,6 @@ fn fileSetTimestamps( |
| 5890 | 5831 | .MTIM = true, |
| 5891 | 5832 | })) { |
| 5892 | 5833 | .SUCCESS => return current_thread.endSyscall(), |
| 5893 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5894 | 5834 | .INTR => { |
| 5895 | 5835 | try current_thread.checkCancel(); |
| 5896 | 5836 | continue; |
| ... | ... | @@ -5915,7 +5855,6 @@ fn fileSetTimestamps( |
| 5915 | 5855 | while (true) { |
| 5916 | 5856 | switch (posix.errno(posix.system.futimens(file.handle, &times))) { |
| 5917 | 5857 | .SUCCESS => return current_thread.endSyscall(), |
| 5918 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5919 | 5858 | .INTR => { |
| 5920 | 5859 | try current_thread.checkCancel(); |
| 5921 | 5860 | continue; |
| ... | ... | @@ -5952,7 +5891,6 @@ fn fileSetTimestampsNow(userdata: ?*anyopaque, file: File) File.SetTimestampsErr |
| 5952 | 5891 | .MTIM_NOW = true, |
| 5953 | 5892 | })) { |
| 5954 | 5893 | .SUCCESS => return current_thread.endSyscall(), |
| 5955 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5956 | 5894 | .INTR => { |
| 5957 | 5895 | try current_thread.checkCancel(); |
| 5958 | 5896 | continue; |
| ... | ... | @@ -5977,7 +5915,6 @@ fn fileSetTimestampsNow(userdata: ?*anyopaque, file: File) File.SetTimestampsErr |
| 5977 | 5915 | while (true) { |
| 5978 | 5916 | switch (posix.errno(posix.system.futimens(file.handle, null))) { |
| 5979 | 5917 | .SUCCESS => return current_thread.endSyscall(), |
| 5980 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 5981 | 5918 | .INTR => { |
| 5982 | 5919 | try current_thread.checkCancel(); |
| 5983 | 5920 | continue; |
| ... | ... | @@ -6061,7 +5998,6 @@ fn fileLock(userdata: ?*anyopaque, file: File, lock: File.Lock) File.LockError!v |
| 6061 | 5998 | while (true) { |
| 6062 | 5999 | switch (posix.errno(posix.system.flock(file.handle, operation))) { |
| 6063 | 6000 | .SUCCESS => return current_thread.endSyscall(), |
| 6064 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6065 | 6001 | .INTR => { |
| 6066 | 6002 | try current_thread.checkCancel(); |
| 6067 | 6003 | continue; |
| ... | ... | @@ -6143,7 +6079,6 @@ fn fileTryLock(userdata: ?*anyopaque, file: File, lock: File.Lock) File.LockErro |
| 6143 | 6079 | current_thread.endSyscall(); |
| 6144 | 6080 | return true; |
| 6145 | 6081 | }, |
| 6146 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6147 | 6082 | .INTR => { |
| 6148 | 6083 | try current_thread.checkCancel(); |
| 6149 | 6084 | continue; |
| ... | ... | @@ -6259,7 +6194,6 @@ fn fileDowngradeLock(userdata: ?*anyopaque, file: File) File.DowngradeLockError! |
| 6259 | 6194 | current_thread.endSyscall(); |
| 6260 | 6195 | return; |
| 6261 | 6196 | }, |
| 6262 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6263 | 6197 | .INTR => { |
| 6264 | 6198 | try current_thread.checkCancel(); |
| 6265 | 6199 | continue; |
| ... | ... | @@ -6328,7 +6262,6 @@ fn dirOpenDirWasi( |
| 6328 | 6262 | try current_thread.checkCancel(); |
| 6329 | 6263 | continue; |
| 6330 | 6264 | }, |
| 6331 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6332 | 6265 | else => |e| { |
| 6333 | 6266 | current_thread.endSyscall(); |
| 6334 | 6267 | switch (e) { |
| ... | ... | @@ -6387,7 +6320,6 @@ fn dirHardLink( |
| 6387 | 6320 | try current_thread.checkCancel(); |
| 6388 | 6321 | continue; |
| 6389 | 6322 | }, |
| 6390 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6391 | 6323 | else => |e| { |
| 6392 | 6324 | current_thread.endSyscall(); |
| 6393 | 6325 | switch (e) { |
| ... | ... | @@ -6437,7 +6369,6 @@ fn dirHardLink( |
| 6437 | 6369 | try current_thread.checkCancel(); |
| 6438 | 6370 | continue; |
| 6439 | 6371 | }, |
| 6440 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6441 | 6372 | else => |e| { |
| 6442 | 6373 | current_thread.endSyscall(); |
| 6443 | 6374 | switch (e) { |
| ... | ... | @@ -6506,7 +6437,6 @@ fn fileReadStreamingPosix(userdata: ?*anyopaque, file: File, data: []const []u8) |
| 6506 | 6437 | try current_thread.checkCancel(); |
| 6507 | 6438 | continue; |
| 6508 | 6439 | }, |
| 6509 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6510 | 6440 | else => |e| { |
| 6511 | 6441 | current_thread.endSyscall(); |
| 6512 | 6442 | switch (e) { |
| ... | ... | @@ -6540,7 +6470,6 @@ fn fileReadStreamingPosix(userdata: ?*anyopaque, file: File, data: []const []u8) |
| 6540 | 6470 | try current_thread.checkCancel(); |
| 6541 | 6471 | continue; |
| 6542 | 6472 | }, |
| 6543 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6544 | 6473 | else => |e| { |
| 6545 | 6474 | current_thread.endSyscall(); |
| 6546 | 6475 | switch (e) { |
| ... | ... | @@ -6627,7 +6556,6 @@ fn fileReadPositionalPosix(userdata: ?*anyopaque, file: File, data: []const []u8 |
| 6627 | 6556 | try current_thread.checkCancel(); |
| 6628 | 6557 | continue; |
| 6629 | 6558 | }, |
| 6630 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6631 | 6559 | else => |e| { |
| 6632 | 6560 | current_thread.endSyscall(); |
| 6633 | 6561 | switch (e) { |
| ... | ... | @@ -6665,7 +6593,6 @@ fn fileReadPositionalPosix(userdata: ?*anyopaque, file: File, data: []const []u8 |
| 6665 | 6593 | try current_thread.checkCancel(); |
| 6666 | 6594 | continue; |
| 6667 | 6595 | }, |
| 6668 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6669 | 6596 | else => |e| { |
| 6670 | 6597 | current_thread.endSyscall(); |
| 6671 | 6598 | switch (e) { |
| ... | ... | @@ -6759,7 +6686,6 @@ fn fileSeekBy(userdata: ?*anyopaque, file: File, offset: i64) File.SeekError!voi |
| 6759 | 6686 | try current_thread.checkCancel(); |
| 6760 | 6687 | continue; |
| 6761 | 6688 | }, |
| 6762 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6763 | 6689 | else => |e| { |
| 6764 | 6690 | current_thread.endSyscall(); |
| 6765 | 6691 | switch (e) { |
| ... | ... | @@ -6793,7 +6719,6 @@ fn fileSeekBy(userdata: ?*anyopaque, file: File, offset: i64) File.SeekError!voi |
| 6793 | 6719 | try current_thread.checkCancel(); |
| 6794 | 6720 | continue; |
| 6795 | 6721 | }, |
| 6796 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6797 | 6722 | else => |e| { |
| 6798 | 6723 | current_thread.endSyscall(); |
| 6799 | 6724 | switch (e) { |
| ... | ... | @@ -6823,7 +6748,6 @@ fn fileSeekBy(userdata: ?*anyopaque, file: File, offset: i64) File.SeekError!voi |
| 6823 | 6748 | try current_thread.checkCancel(); |
| 6824 | 6749 | continue; |
| 6825 | 6750 | }, |
| 6826 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6827 | 6751 | else => |e| { |
| 6828 | 6752 | current_thread.endSyscall(); |
| 6829 | 6753 | switch (e) { |
| ... | ... | @@ -6862,7 +6786,6 @@ fn fileSeekTo(userdata: ?*anyopaque, file: File, offset: u64) File.SeekError!voi |
| 6862 | 6786 | try current_thread.checkCancel(); |
| 6863 | 6787 | continue; |
| 6864 | 6788 | }, |
| 6865 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6866 | 6789 | else => |e| { |
| 6867 | 6790 | current_thread.endSyscall(); |
| 6868 | 6791 | switch (e) { |
| ... | ... | @@ -6898,7 +6821,6 @@ fn posixSeekTo(current_thread: *Thread, fd: posix.fd_t, offset: u64) File.SeekEr |
| 6898 | 6821 | try current_thread.checkCancel(); |
| 6899 | 6822 | continue; |
| 6900 | 6823 | }, |
| 6901 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6902 | 6824 | else => |e| { |
| 6903 | 6825 | current_thread.endSyscall(); |
| 6904 | 6826 | switch (e) { |
| ... | ... | @@ -6925,7 +6847,6 @@ fn posixSeekTo(current_thread: *Thread, fd: posix.fd_t, offset: u64) File.SeekEr |
| 6925 | 6847 | try current_thread.checkCancel(); |
| 6926 | 6848 | continue; |
| 6927 | 6849 | }, |
| 6928 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 6929 | 6850 | else => |e| { |
| 6930 | 6851 | current_thread.endSyscall(); |
| 6931 | 6852 | switch (e) { |
| ... | ... | @@ -7011,7 +6932,6 @@ fn processExecutablePath(userdata: ?*anyopaque, out_buffer: []u8) std.process.Ex |
| 7011 | 6932 | try current_thread.checkCancel(); |
| 7012 | 6933 | continue; |
| 7013 | 6934 | }, |
| 7014 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 7015 | 6935 | else => |e| { |
| 7016 | 6936 | current_thread.endSyscall(); |
| 7017 | 6937 | switch (e) { |
| ... | ... | @@ -7040,7 +6960,6 @@ fn processExecutablePath(userdata: ?*anyopaque, out_buffer: []u8) std.process.Ex |
| 7040 | 6960 | try current_thread.checkCancel(); |
| 7041 | 6961 | continue; |
| 7042 | 6962 | }, |
| 7043 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 7044 | 6963 | else => |e| { |
| 7045 | 6964 | current_thread.endSyscall(); |
| 7046 | 6965 | switch (e) { |
| ... | ... | @@ -7194,7 +7113,6 @@ fn fileWritePositional( |
| 7194 | 7113 | try current_thread.checkCancel(); |
| 7195 | 7114 | continue; |
| 7196 | 7115 | }, |
| 7197 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 7198 | 7116 | else => |e| { |
| 7199 | 7117 | current_thread.endSyscall(); |
| 7200 | 7118 | switch (e) { |
| ... | ... | @@ -7232,7 +7150,6 @@ fn fileWritePositional( |
| 7232 | 7150 | try current_thread.checkCancel(); |
| 7233 | 7151 | continue; |
| 7234 | 7152 | }, |
| 7235 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 7236 | 7153 | else => |e| { |
| 7237 | 7154 | current_thread.endSyscall(); |
| 7238 | 7155 | switch (e) { |
| ... | ... | @@ -7316,7 +7233,6 @@ fn fileWriteStreaming( |
| 7316 | 7233 | try current_thread.checkCancel(); |
| 7317 | 7234 | continue; |
| 7318 | 7235 | }, |
| 7319 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 7320 | 7236 | else => |e| { |
| 7321 | 7237 | current_thread.endSyscall(); |
| 7322 | 7238 | switch (e) { |
| ... | ... | @@ -7351,7 +7267,6 @@ fn fileWriteStreaming( |
| 7351 | 7267 | try current_thread.checkCancel(); |
| 7352 | 7268 | continue; |
| 7353 | 7269 | }, |
| 7354 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 7355 | 7270 | else => |e| { |
| 7356 | 7271 | current_thread.endSyscall(); |
| 7357 | 7272 | switch (e) { |
| ... | ... | @@ -7619,7 +7534,6 @@ fn fileWriteFileStreaming( |
| 7619 | 7534 | try current_thread.checkCancel(); |
| 7620 | 7535 | continue; |
| 7621 | 7536 | }, |
| 7622 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 7623 | 7537 | else => |e| { |
| 7624 | 7538 | current_thread.endSyscall(); |
| 7625 | 7539 | assert(error.Unexpected == switch (e) { |
| ... | ... | @@ -7692,7 +7606,6 @@ fn fileWriteFileStreaming( |
| 7692 | 7606 | try current_thread.checkCancel(); |
| 7693 | 7607 | continue; |
| 7694 | 7608 | }, |
| 7695 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 7696 | 7609 | .OPNOTSUPP, .INVAL, .NOSYS => { |
| 7697 | 7610 | // Give calling code chance to observe before trying |
| 7698 | 7611 | // something else. |
| ... | ... | @@ -7869,7 +7782,6 @@ fn fileWriteFilePositional( |
| 7869 | 7782 | try current_thread.checkCancel(); |
| 7870 | 7783 | continue; |
| 7871 | 7784 | }, |
| 7872 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 7873 | 7785 | .OPNOTSUPP, .INVAL, .NOSYS => { |
| 7874 | 7786 | // Give calling code chance to observe before trying |
| 7875 | 7787 | // something else. |
| ... | ... | @@ -8098,7 +8010,6 @@ fn sleepLinux(userdata: ?*anyopaque, timeout: Io.Timeout) Io.SleepError!void { |
| 8098 | 8010 | try current_thread.checkCancel(); |
| 8099 | 8011 | continue; |
| 8100 | 8012 | }, |
| 8101 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 8102 | 8013 | else => |e| { |
| 8103 | 8014 | current_thread.endSyscall(); |
| 8104 | 8015 | switch (e) { |
| ... | ... | @@ -8176,7 +8087,6 @@ fn sleepPosix(userdata: ?*anyopaque, timeout: Io.Timeout) Io.SleepError!void { |
| 8176 | 8087 | try current_thread.checkCancel(); |
| 8177 | 8088 | continue; |
| 8178 | 8089 | }, |
| 8179 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 8180 | 8090 | // This prong handles success as well as unexpected errors. |
| 8181 | 8091 | else => return current_thread.endSyscall(), |
| 8182 | 8092 | } |
| ... | ... | @@ -8250,7 +8160,6 @@ fn netListenIpPosix( |
| 8250 | 8160 | try current_thread.checkCancel(); |
| 8251 | 8161 | continue; |
| 8252 | 8162 | }, |
| 8253 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 8254 | 8163 | else => |e| { |
| 8255 | 8164 | current_thread.endSyscall(); |
| 8256 | 8165 | switch (e) { |
| ... | ... | @@ -8414,7 +8323,6 @@ fn netListenUnixPosix( |
| 8414 | 8323 | try current_thread.checkCancel(); |
| 8415 | 8324 | continue; |
| 8416 | 8325 | }, |
| 8417 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 8418 | 8326 | else => |e| { |
| 8419 | 8327 | current_thread.endSyscall(); |
| 8420 | 8328 | switch (e) { |
| ... | ... | @@ -8538,7 +8446,6 @@ fn posixBindUnix( |
| 8538 | 8446 | try current_thread.checkCancel(); |
| 8539 | 8447 | continue; |
| 8540 | 8448 | }, |
| 8541 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 8542 | 8449 | else => |e| { |
| 8543 | 8450 | current_thread.endSyscall(); |
| 8544 | 8451 | switch (e) { |
| ... | ... | @@ -8583,7 +8490,6 @@ fn posixBind( |
| 8583 | 8490 | try current_thread.checkCancel(); |
| 8584 | 8491 | continue; |
| 8585 | 8492 | }, |
| 8586 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 8587 | 8493 | else => |e| { |
| 8588 | 8494 | current_thread.endSyscall(); |
| 8589 | 8495 | switch (e) { |
| ... | ... | @@ -8619,7 +8525,6 @@ fn posixConnect( |
| 8619 | 8525 | try current_thread.checkCancel(); |
| 8620 | 8526 | continue; |
| 8621 | 8527 | }, |
| 8622 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 8623 | 8528 | else => |e| { |
| 8624 | 8529 | current_thread.endSyscall(); |
| 8625 | 8530 | switch (e) { |
| ... | ... | @@ -8666,7 +8571,6 @@ fn posixConnectUnix( |
| 8666 | 8571 | try current_thread.checkCancel(); |
| 8667 | 8572 | continue; |
| 8668 | 8573 | }, |
| 8669 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 8670 | 8574 | else => |e| { |
| 8671 | 8575 | current_thread.endSyscall(); |
| 8672 | 8576 | switch (e) { |
| ... | ... | @@ -8711,7 +8615,6 @@ fn posixGetSockName( |
| 8711 | 8615 | try current_thread.checkCancel(); |
| 8712 | 8616 | continue; |
| 8713 | 8617 | }, |
| 8714 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 8715 | 8618 | else => |e| { |
| 8716 | 8619 | current_thread.endSyscall(); |
| 8717 | 8620 | switch (e) { |
| ... | ... | @@ -8779,7 +8682,6 @@ fn setSocketOption(current_thread: *Thread, fd: posix.fd_t, level: i32, opt_name |
| 8779 | 8682 | try current_thread.checkCancel(); |
| 8780 | 8683 | continue; |
| 8781 | 8684 | }, |
| 8782 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 8783 | 8685 | else => |e| { |
| 8784 | 8686 | current_thread.endSyscall(); |
| 8785 | 8687 | switch (e) { |
| ... | ... | @@ -9109,7 +9011,6 @@ fn openSocketPosix( |
| 9109 | 9011 | switch (posix.errno(posix.system.fcntl(fd, posix.F.SETFD, @as(usize, posix.FD_CLOEXEC)))) { |
| 9110 | 9012 | .SUCCESS => break, |
| 9111 | 9013 | .INTR => continue, |
| 9112 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 9113 | 9014 | else => |err| { |
| 9114 | 9015 | current_thread.endSyscall(); |
| 9115 | 9016 | return posix.unexpectedErrno(err); |
| ... | ... | @@ -9123,7 +9024,6 @@ fn openSocketPosix( |
| 9123 | 9024 | try current_thread.checkCancel(); |
| 9124 | 9025 | continue; |
| 9125 | 9026 | }, |
| 9126 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 9127 | 9027 | else => |e| { |
| 9128 | 9028 | current_thread.endSyscall(); |
| 9129 | 9029 | switch (e) { |
| ... | ... | @@ -9225,7 +9125,6 @@ fn netAcceptPosix(userdata: ?*anyopaque, listen_fd: net.Socket.Handle) net.Serve |
| 9225 | 9125 | try current_thread.checkCancel(); |
| 9226 | 9126 | continue; |
| 9227 | 9127 | }, |
| 9228 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 9229 | 9128 | else => |e| { |
| 9230 | 9129 | current_thread.endSyscall(); |
| 9231 | 9130 | switch (e) { |
| ... | ... | @@ -9334,7 +9233,6 @@ fn netReadPosix(userdata: ?*anyopaque, fd: net.Socket.Handle, data: [][]u8) net. |
| 9334 | 9233 | try current_thread.checkCancel(); |
| 9335 | 9234 | continue; |
| 9336 | 9235 | }, |
| 9337 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 9338 | 9236 | else => |e| { |
| 9339 | 9237 | current_thread.endSyscall(); |
| 9340 | 9238 | switch (e) { |
| ... | ... | @@ -9367,7 +9265,6 @@ fn netReadPosix(userdata: ?*anyopaque, fd: net.Socket.Handle, data: [][]u8) net. |
| 9367 | 9265 | try current_thread.checkCancel(); |
| 9368 | 9266 | continue; |
| 9369 | 9267 | }, |
| 9370 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 9371 | 9268 | else => |e| { |
| 9372 | 9269 | current_thread.endSyscall(); |
| 9373 | 9270 | switch (e) { |
| ... | ... | @@ -9603,7 +9500,6 @@ fn netSendOne( |
| 9603 | 9500 | try current_thread.checkCancel(); |
| 9604 | 9501 | continue; |
| 9605 | 9502 | }, |
| 9606 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 9607 | 9503 | else => |e| { |
| 9608 | 9504 | current_thread.endSyscall(); |
| 9609 | 9505 | switch (e) { |
| ... | ... | @@ -9680,7 +9576,6 @@ fn netSendMany( |
| 9680 | 9576 | try current_thread.checkCancel(); |
| 9681 | 9577 | continue; |
| 9682 | 9578 | }, |
| 9683 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 9684 | 9579 | else => |e| { |
| 9685 | 9580 | current_thread.endSyscall(); |
| 9686 | 9581 | switch (e) { |
| ... | ... | @@ -9813,7 +9708,6 @@ fn netReceivePosix( |
| 9813 | 9708 | continue :recv; |
| 9814 | 9709 | }, |
| 9815 | 9710 | .INTR => continue, |
| 9816 | | .CANCELED => return .{ current_thread.endSyscallCanceled(), message_i }, |
| 9817 | 9711 | |
| 9818 | 9712 | .FAULT => |err| return .{ errnoBug(err), message_i }, |
| 9819 | 9713 | .INVAL => |err| return .{ errnoBug(err), message_i }, |
| ... | ... | @@ -9822,7 +9716,6 @@ fn netReceivePosix( |
| 9822 | 9716 | } |
| 9823 | 9717 | }, |
| 9824 | 9718 | .INTR => continue, |
| 9825 | | .CANCELED => return .{ current_thread.endSyscallCanceled(), message_i }, |
| 9826 | 9719 | |
| 9827 | 9720 | .BADF => |err| return .{ errnoBug(err), message_i }, |
| 9828 | 9721 | .NFILE => return .{ error.SystemFdQuotaExceeded, message_i }, |
| ... | ... | @@ -9942,7 +9835,6 @@ fn netWritePosix( |
| 9942 | 9835 | try current_thread.checkCancel(); |
| 9943 | 9836 | continue; |
| 9944 | 9837 | }, |
| 9945 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 9946 | 9838 | else => |e| { |
| 9947 | 9839 | current_thread.endSyscall(); |
| 9948 | 9840 | switch (e) { |
| ... | ... | @@ -10040,8 +9932,7 @@ fn netWriteWindows( |
| 10040 | 9932 | else => |err| err, |
| 10041 | 9933 | }; |
| 10042 | 9934 | switch (wsa_error) { |
| 10043 | | .EINTR => continue, |
| 10044 | | .ECANCELLED, .E_CANCELLED, .OPERATION_ABORTED => return current_thread.endSyscallCanceled(), |
| 9935 | .EINTR, .ECANCELLED, .E_CANCELLED, .OPERATION_ABORTED => continue, |
| 10045 | 9936 | .NOTINITIALISED => { |
| 10046 | 9937 | try initializeWsa(t); |
| 10047 | 9938 | continue; |
| ... | ... | @@ -10160,7 +10051,6 @@ fn netInterfaceNameResolve( |
| 10160 | 10051 | try current_thread.checkCancel(); |
| 10161 | 10052 | continue; |
| 10162 | 10053 | }, |
| 10163 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 10164 | 10054 | else => |e| { |
| 10165 | 10055 | current_thread.endSyscall(); |
| 10166 | 10056 | switch (e) { |
| ... | ... | @@ -10464,7 +10354,6 @@ fn netLookupFallible( |
| 10464 | 10354 | try current_thread.checkCancel(); |
| 10465 | 10355 | continue; |
| 10466 | 10356 | }, |
| 10467 | | .CANCELED => return current_thread.endSyscallCanceled(), |
| 10468 | 10357 | else => |e| { |
| 10469 | 10358 | current_thread.endSyscall(); |
| 10470 | 10359 | return posix.unexpectedErrno(e); |