mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 21:35:30 +08:00
timecounter: Merge FreeBSD change r286423
RFC 2783 requires a status of ETIMEDOUT, not EWOULDBLOCK, on a timeout. Update #3175.
This commit is contained in:
committed by
Sebastian Huber
parent
016306354f
commit
ec349b5836
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user