summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-20 08:42:55 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-24 09:37:27 +0200
commitd16d07fbb82132e185835382201243c5eab5417a (patch)
tree8bb4a4214fc21feca5fc735a1cd416de59e8366e /cpukit/score/include/rtems
parentscore: _Watchdog_Is_far_future_realtime_timespec() (diff)
downloadrtems-d16d07fbb82132e185835382201243c5eab5417a.tar.bz2
score: Add _Watchdog_Is_valid_interval_timespec()
Update #3117. Update #3182.
Diffstat (limited to 'cpukit/score/include/rtems')
-rw-r--r--cpukit/score/include/rtems/score/watchdogimpl.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/watchdogimpl.h b/cpukit/score/include/rtems/score/watchdogimpl.h
index d9dfa36b56..9fc1f05837 100644
--- a/cpukit/score/include/rtems/score/watchdogimpl.h
+++ b/cpukit/score/include/rtems/score/watchdogimpl.h
@@ -312,6 +312,13 @@ RTEMS_INLINE_ROUTINE bool _Watchdog_Is_valid_timespec(
&& (unsigned long) ts->tv_nsec < WATCHDOG_NANOSECONDS_PER_SECOND;
}
+RTEMS_INLINE_ROUTINE bool _Watchdog_Is_valid_interval_timespec(
+ const struct timespec *ts
+)
+{
+ return _Watchdog_Is_valid_timespec( ts ) && ts->tv_sec >= 0;
+}
+
RTEMS_INLINE_ROUTINE bool _Watchdog_Is_far_future_realtime_timespec(
const struct timespec *ts
)