diff options
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/watchdogimpl.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/cpukit/score/include/rtems/score/watchdogimpl.h b/cpukit/score/include/rtems/score/watchdogimpl.h index c5f8d209a6..0900a1b8e7 100644 --- a/cpukit/score/include/rtems/score/watchdogimpl.h +++ b/cpukit/score/include/rtems/score/watchdogimpl.h @@ -340,45 +340,45 @@ RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_release_critical( } RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_relative( - Watchdog_Control *the_watchdog, - Per_CPU_Control *cpu, - uint32_t ticks + Watchdog_Control *the_watchdog, + Per_CPU_Control *cpu, + Watchdog_Interval ticks ) { ISR_lock_Context lock_context; + Watchdog_Header *header; uint64_t expire; _Watchdog_Set_CPU( the_watchdog, cpu ); _Watchdog_Per_CPU_acquire_critical( cpu, &lock_context ); - expire = cpu->Watchdog.ticks + ticks; - _Watchdog_Insert( - &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ], - the_watchdog, - expire - ); - _Watchdog_Per_CPU_release_critical( cpu, &lock_context ); + expire = ticks + cpu->Watchdog.ticks; + header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ]; + + _Watchdog_Insert(header, the_watchdog, expire); + _Watchdog_Per_CPU_release_critical( cpu, &lock_context ); return expire; } -RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_insert_absolute( - Watchdog_Control *the_watchdog, - Per_CPU_Control *cpu, - uint64_t expire +RTEMS_INLINE_ROUTINE uint64_t _Watchdog_Per_CPU_insert_absolute( + Watchdog_Control *the_watchdog, + Per_CPU_Control *cpu, + uint64_t expire ) { ISR_lock_Context lock_context; + Watchdog_Header *header; _Watchdog_Set_CPU( the_watchdog, cpu ); _Watchdog_Per_CPU_acquire_critical( cpu, &lock_context ); - _Watchdog_Insert( - &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ], - the_watchdog, - expire - ); + + header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_ABSOLUTE ]; + + _Watchdog_Insert(header, the_watchdog, expire); _Watchdog_Per_CPU_release_critical( cpu, &lock_context ); + return expire; } RTEMS_INLINE_ROUTINE void _Watchdog_Per_CPU_remove( |