summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/watchdogimpl.h
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2016-06-09 11:33:15 -0400
committerGedare Bloom <gedare@rtems.org>2016-07-25 12:44:47 -0400
commitf23d4706169d68d3c4e90b297650f89c272716f4 (patch)
tree333bdc4b4be2ec4ad7ee80ee03229759ec60602a /cpukit/score/include/rtems/score/watchdogimpl.h
parentscore: Fix for RTEMS_DEBUG (diff)
downloadrtems-f23d4706169d68d3c4e90b297650f89c272716f4.tar.bz2
cpukit: Add and use Watchdog_Discipline.
Clock disciplines may be WATCHDOG_RELATIVE, WATCHDOG_ABSOLUTE, or WATCHDOG_NO_TIMEOUT. A discipline of WATCHDOG_RELATIVE with a timeout of WATCHDOG_NO_TIMEOUT is equivalent to a discipline of WATCHDOG_NO_TIMEOUT. updates #2732
Diffstat (limited to 'cpukit/score/include/rtems/score/watchdogimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/watchdogimpl.h38
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(