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/include/rtems/score/threadimpl.h | |
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/include/rtems/score/threadimpl.h')
-rw-r--r-- | cpukit/include/rtems/score/threadimpl.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cpukit/include/rtems/score/threadimpl.h b/cpukit/include/rtems/score/threadimpl.h index b6722fae19..777158b77a 100644 --- a/cpukit/include/rtems/score/threadimpl.h +++ b/cpukit/include/rtems/score/threadimpl.h @@ -1864,7 +1864,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Timer_initialize( ) { _ISR_lock_Initialize( &timer->Lock, "Thread Timer" ); - timer->header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ]; + timer->header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_TICKS ]; _Watchdog_Preinitialize( &timer->Watchdog, cpu ); } @@ -1879,7 +1879,7 @@ RTEMS_INLINE_ROUTINE void _Thread_Add_timeout_ticks( _ISR_lock_ISR_disable_and_acquire( &the_thread->Timer.Lock, &lock_context ); the_thread->Timer.header = - &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_MONOTONIC ]; + &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_TICKS ]; the_thread->Timer.Watchdog.routine = _Thread_Timeout; _Watchdog_Per_CPU_insert_ticks( &the_thread->Timer.Watchdog, cpu, ticks ); @@ -1893,14 +1893,15 @@ RTEMS_INLINE_ROUTINE void _Thread_Timer_insert_realtime( uint64_t expire ) { - ISR_lock_Context lock_context; + ISR_lock_Context lock_context; + Watchdog_Header *header; _ISR_lock_ISR_disable_and_acquire( &the_thread->Timer.Lock, &lock_context ); - the_thread->Timer.header = - &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ]; + header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_REALTIME ]; + the_thread->Timer.header = header; the_thread->Timer.Watchdog.routine = routine; - _Watchdog_Per_CPU_insert_realtime( &the_thread->Timer.Watchdog, cpu, expire ); + _Watchdog_Per_CPU_insert( &the_thread->Timer.Watchdog, cpu, header, expire ); _ISR_lock_Release_and_ISR_enable( &the_thread->Timer.Lock, &lock_context ); } |