From 2e71aa41965e175203d9dcd8fb00fe5104d0c737 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 17 Feb 2016 12:52:17 +0100 Subject: score: Simplify _Watchdog_Tick() Move thread dispatch disable check to legacy rtems_clock_tick(). Assert that thread dispatching is disabled in _Watchdog_Tick(). This is usually the case, since this function is called in interrupt context by the clock tick service routine. --- cpukit/score/src/watchdogtick.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpukit/score/src/watchdogtick.c') diff --git a/cpukit/score/src/watchdogtick.c b/cpukit/score/src/watchdogtick.c index b9bc3f7a9c..cb68ea2f02 100644 --- a/cpukit/score/src/watchdogtick.c +++ b/cpukit/score/src/watchdogtick.c @@ -12,8 +12,9 @@ * http://www.rtems.org/license/LICENSE. */ +#include #include -#include +#include #include #include @@ -23,12 +24,11 @@ void _Watchdog_Tick( void ) { + _Assert( !_Thread_Dispatch_is_enabled() ); + _TOD_Tickle_ticks(); _Watchdog_Tickle_ticks(); _Scheduler_Tick(); - - if ( _Thread_Dispatch_is_enabled() ) - _Thread_Dispatch(); } -- cgit v1.2.3