[rtems commit] timecounter: Merge FreeBSD change r286423

Sebastian Huber sebh at rtems.org
Thu Oct 12 05:06:50 UTC 2017


Module:    rtems
Branch:    master
Commit:    ec349b58363a5936af9022c2b4847db633a45145
Changeset: http://git.rtems.org/rtems/commit/?id=ec349b58363a5936af9022c2b4847db633a45145

Author:    Ian Lepore <ian at FreeBSD.org>
Date:      Fri Aug  7 21:14:19 2015 +0000

timecounter: Merge FreeBSD change r286423

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

Update #3175.

---

 cpukit/score/src/kern_tc.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c
index 30880e8..a789107 100644
--- a/cpukit/score/src/kern_tc.c
+++ b/cpukit/score/src/kern_tc.c
@@ -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);
 			}



More information about the vc mailing list