summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_tc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c
index acb0fbf..0d4ffa2 100644
--- a/sys/kern/kern_tc.c
+++ b/sys/kern/kern_tc.c
@@ -1511,8 +1511,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);
}
@@ -1668,6 +1672,9 @@ pps_event(struct pps_state *pps, int event)
#endif
KASSERT(pps != NULL, ("NULL pps pointer in pps_event"));
+ /* Nothing to do if not currently set to capture this event type. */
+ if ((event & pps->ppsparam.mode) == 0)
+ return;
/* If the timecounter was wound up underneath us, bail out. */
if (pps->capgen == 0 || pps->capgen != pps->capth->th_generation)
return;
OpenPOWER on IntegriCloud