timecounter: Merge FreeBSD change r286423

RFC 2783 requires a status of ETIMEDOUT, not EWOULDBLOCK, on a timeout.

Update #3175.
This commit is contained in:
Ian Lepore
2017-10-12 07:04:10 +02:00
committed by Sebastian Huber
parent 016306354f
commit ec349b5836
+6 -2
View File
@@ -1740,8 +1740,12 @@ pps_fetch(struct pps_fetch_args *fapi, struct pps_state *pps)
} else {
err = tsleep(pps, PCATCH, "ppsfch", timo);
}
if (err == EWOULDBLOCK && fapi->timeout.tv_sec == -1) {
continue;
if (err == EWOULDBLOCK) {
if (fapi->timeout.tv_sec == -1) {
continue;
} else {
return (ETIMEDOUT);
}
} else if (err != 0) {
return (err);
}