| ... | @@ -133,7 +133,6 @@ fn worker(t: *Threaded) void { | ... | @@ -133,7 +133,6 @@ fn worker(t: *Threaded) void { |
| 133 | closure.start(closure); | 133 | closure.start(closure); |
| 134 | t.mutex.lock(); | 134 | t.mutex.lock(); |
| 135 | if (is_concurrent) { | 135 | if (is_concurrent) { |
| 136 | // TODO also pop thread and join sometimes | | |
| 137 | t.concurrent_count -= 1; | 136 | t.concurrent_count -= 1; |
| 138 | } | 137 | } |
| 139 | } | 138 | } |
| ... | @@ -1175,7 +1174,7 @@ fn dirCreateFilePosix( | ... | @@ -1175,7 +1174,7 @@ fn dirCreateFilePosix( |
| 1175 | fl_flags &= ~@as(usize, 1 << @bitOffsetOf(posix.O, "NONBLOCK")); | 1174 | fl_flags &= ~@as(usize, 1 << @bitOffsetOf(posix.O, "NONBLOCK")); |
| 1176 | while (true) { | 1175 | while (true) { |
| 1177 | try t.checkCancel(); | 1176 | try t.checkCancel(); |
| 1178 | switch (posix.errno(posix.fcntl(fd, posix.F.SETFL, fl_flags))) { | 1177 | switch (posix.errno(posix.system.fcntl(fd, posix.F.SETFL, fl_flags))) { |
| 1179 | .SUCCESS => break, | 1178 | .SUCCESS => break, |
| 1180 | .INTR => continue, | 1179 | .INTR => continue, |
| 1181 | else => |err| return posix.unexpectedErrno(err), | 1180 | else => |err| return posix.unexpectedErrno(err), |
| ... | @@ -1304,7 +1303,7 @@ fn dirOpenFile( | ... | @@ -1304,7 +1303,7 @@ fn dirOpenFile( |
| 1304 | fl_flags &= ~@as(usize, 1 << @bitOffsetOf(posix.O, "NONBLOCK")); | 1303 | fl_flags &= ~@as(usize, 1 << @bitOffsetOf(posix.O, "NONBLOCK")); |
| 1305 | while (true) { | 1304 | while (true) { |
| 1306 | try t.checkCancel(); | 1305 | try t.checkCancel(); |
| 1307 | switch (posix.errno(posix.fcntl(fd, posix.F.SETFL, fl_flags))) { | 1306 | switch (posix.errno(posix.system.fcntl(fd, posix.F.SETFL, fl_flags))) { |
| 1308 | .SUCCESS => break, | 1307 | .SUCCESS => break, |
| 1309 | .INTR => continue, | 1308 | .INTR => continue, |
| 1310 | else => |err| return posix.unexpectedErrno(err), | 1309 | else => |err| return posix.unexpectedErrno(err), |
| ... | @@ -2263,7 +2262,6 @@ fn netSendOne( | ... | @@ -2263,7 +2262,6 @@ fn netSendOne( |
| 2263 | .WSAEDESTADDRREQ => unreachable, // A destination address is required. | 2262 | .WSAEDESTADDRREQ => unreachable, // A destination address is required. |
| 2264 | .WSAEFAULT => unreachable, // The lpBuffers, lpTo, lpOverlapped, lpNumberOfBytesSent, or lpCompletionRoutine parameters are not part of the user address space, or the lpTo parameter is too small. | 2263 | .WSAEFAULT => unreachable, // The lpBuffers, lpTo, lpOverlapped, lpNumberOfBytesSent, or lpCompletionRoutine parameters are not part of the user address space, or the lpTo parameter is too small. |
| 2265 | .WSAEHOSTUNREACH => return error.NetworkUnreachable, | 2264 | .WSAEHOSTUNREACH => return error.NetworkUnreachable, |
| 2266 | // TODO: WSAEINPROGRESS, WSAEINTR | | |
| 2267 | .WSAEINVAL => unreachable, | 2265 | .WSAEINVAL => unreachable, |
| 2268 | .WSAENETDOWN => return error.NetworkDown, | 2266 | .WSAENETDOWN => return error.NetworkDown, |
| 2269 | .WSAENETRESET => return error.ConnectionResetByPeer, | 2267 | .WSAENETRESET => return error.ConnectionResetByPeer, |
| ... | @@ -3186,11 +3184,11 @@ fn lookupDns( | ... | @@ -3186,11 +3184,11 @@ fn lookupDns( |
| 3186 | | 3184 | |
| 3187 | for (answers) |answer| { | 3185 | for (answers) |answer| { |
| 3188 | var it = HostName.DnsResponse.init(answer) catch { | 3186 | var it = HostName.DnsResponse.init(answer) catch { |
| 3189 | // TODO accept a diagnostics struct and append warnings | 3187 | // Here we could potentially add diagnostics to the results queue. |
| 3190 | continue; | 3188 | continue; |
| 3191 | }; | 3189 | }; |
| 3192 | while (it.next() catch { | 3190 | while (it.next() catch { |
| 3193 | // TODO accept a diagnostics struct and append warnings | 3191 | // Here we could potentially add diagnostics to the results queue. |
| 3194 | continue; | 3192 | continue; |
| 3195 | }) |record| switch (record.rr) { | 3193 | }) |record| switch (record.rr) { |
| 3196 | std.posix.RR.A => { | 3194 | std.posix.RR.A => { |
| ... | @@ -3239,7 +3237,7 @@ fn lookupHosts( | ... | @@ -3239,7 +3237,7 @@ fn lookupHosts( |
| 3239 | error.Canceled => |e| return e, | 3237 | error.Canceled => |e| return e, |
| 3240 | | 3238 | |
| 3241 | else => { | 3239 | else => { |
| 3242 | // TODO populate optional diagnostic struct | 3240 | // Here we could add more detailed diagnostics to the results queue. |
| 3243 | return error.DetectingNetworkConfigurationFailed; | 3241 | return error.DetectingNetworkConfigurationFailed; |
| 3244 | }, | 3242 | }, |
| 3245 | }; | 3243 | }; |
| ... | @@ -3251,7 +3249,7 @@ fn lookupHosts( | ... | @@ -3251,7 +3249,7 @@ fn lookupHosts( |
| 3251 | error.ReadFailed => switch (file_reader.err.?) { | 3249 | error.ReadFailed => switch (file_reader.err.?) { |
| 3252 | error.Canceled => |e| return e, | 3250 | error.Canceled => |e| return e, |
| 3253 | else => { | 3251 | else => { |
| 3254 | // TODO populate optional diagnostic struct | 3252 | // Here we could add more detailed diagnostics to the results queue. |
| 3255 | return error.DetectingNetworkConfigurationFailed; | 3253 | return error.DetectingNetworkConfigurationFailed; |
| 3256 | }, | 3254 | }, |
| 3257 | }, | 3255 | }, |