diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-12-21 14:36:52 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-02-02 15:01:20 +0100 |
commit | 9480815a222be61214b176836ef2b4ae4155ce84 (patch) | |
tree | 63c96f9a0fb79ead01e6b73d12baaa5ac8cb8378 /cpukit/posix/src/nanosleep.c | |
parent | score: Rename _Watchdog_Realtime_from_*() (diff) | |
download | rtems-9480815a222be61214b176836ef2b4ae4155ce84.tar.bz2 |
score: Introduce new monotonic clock
Rename PER_CPU_WATCHDOG_MONOTONIC to PER_CPU_WATCHDOG_TICKS. Add new
PER_CPU_WATCHDOG_MONOTONIC which is based on the system uptime (measured
by timecounter).
Close #3264.
Diffstat (limited to 'cpukit/posix/src/nanosleep.c')
-rw-r--r-- | cpukit/posix/src/nanosleep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/posix/src/nanosleep.c b/cpukit/posix/src/nanosleep.c index 5bd1b00aa9..7613df92d1 100644 --- a/cpukit/posix/src/nanosleep.c +++ b/cpukit/posix/src/nanosleep.c @@ -25,7 +25,7 @@ #include <rtems/score/threadimpl.h> #include <rtems/score/threadqimpl.h> #include <rtems/score/timespec.h> -#include <rtems/score/todimpl.h> +#include <rtems/score/timecounter.h> #include <rtems/score/watchdogimpl.h> #include <rtems/posix/posixapi.h> #include <rtems/seterr.h> @@ -93,7 +93,7 @@ int clock_nanosleep( ); } } else { - _TOD_Get_zero_based_uptime_as_timespec( &uptime ); + _Timecounter_Nanouptime( &uptime ); end = _Watchdog_Future_timespec( &uptime, rqtp ); _Thread_queue_Context_set_enqueue_timeout_monotonic_timespec( &queue_context, @@ -119,7 +119,7 @@ int clock_nanosleep( if ( eno == EINTR ) { struct timespec actual_end; - _TOD_Get_zero_based_uptime_as_timespec( &actual_end ); + _Timecounter_Nanouptime( &actual_end ); if ( _Timespec_Less_than( &actual_end, end ) ) { _Timespec_Subtract( &actual_end, end, rmtp ); |