summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2015-03-07 18:23:32 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-12 07:04:09 +0200
commitea0b339bbcfee1636918375e55c67e9bc0916021 (patch)
tree2fd5afd4f94cc841d1131d2c43bd18590316aa6f /cpukit/score/src
parentposix: Use right time format in adjtime() (diff)
downloadrtems-ea0b339bbcfee1636918375e55c67e9bc0916021.tar.bz2
timecounter: Merge FreeBSD change r279728
Add mutex support to the pps_ioctl() API in the kernel. Bump kernel version to reflect structure change. PR: 196897 MFC after: 1 week Update #3175.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/kern_tc.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c
index 242983b464..5cdcafb717 100644
--- a/cpukit/score/src/kern_tc.c
+++ b/cpukit/score/src/kern_tc.c
@@ -51,7 +51,6 @@ __FBSDID("$FreeBSD r284178 2015-06-09T11:49:56Z$");
#include <sys/limits.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#include <sys/sbuf.h>
#include <sys/sysctl.h>
#include <sys/syslog.h>
#include <sys/systm.h>
@@ -1713,17 +1712,10 @@ pps_fetch(struct pps_fetch_args *fapi, struct pps_state *pps)
cseq = pps->ppsinfo.clear_sequence;
while (aseq == pps->ppsinfo.assert_sequence &&
cseq == pps->ppsinfo.clear_sequence) {
- if (abi_aware(pps, 1) && pps->driver_mtx != NULL) {
- if (pps->flags & PPSFLAG_MTX_SPIN) {
- err = msleep_spin(pps, pps->driver_mtx,
- "ppsfch", timo);
- } else {
- err = msleep(pps, pps->driver_mtx, PCATCH,
- "ppsfch", timo);
- }
- } else {
+ if (pps->mtx != NULL)
+ err = msleep(pps, pps->mtx, PCATCH, "ppsfch", timo);
+ else
err = tsleep(pps, PCATCH, "ppsfch", timo);
- }
if (err == EWOULDBLOCK && fapi->timeout.tv_sec == -1) {
continue;
} else if (err != 0) {