[rtems commit] score: Add _Watchdog_Is_valid_interval_timespec()
Sebastian Huber
sebh at rtems.org
Tue Oct 24 08:21:29 UTC 2017
Module: rtems
Branch: master
Commit: d16d07fbb82132e185835382201243c5eab5417a
Changeset: http://git.rtems.org/rtems/commit/?id=d16d07fbb82132e185835382201243c5eab5417a
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Oct 20 08:42:55 2017 +0200
score: Add _Watchdog_Is_valid_interval_timespec()
Update #3117.
Update #3182.
---
cpukit/score/include/rtems/score/watchdogimpl.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/cpukit/score/include/rtems/score/watchdogimpl.h b/cpukit/score/include/rtems/score/watchdogimpl.h
index d9dfa36..9fc1f05 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
)
More information about the vc
mailing list