summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/clocktick.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-02-17 12:52:17 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-02-17 12:52:17 +0100
commit2e71aa41965e175203d9dcd8fb00fe5104d0c737 (patch)
tree2c946ae804a05d6892ac085b63f058ce26b86fe1 /cpukit/rtems/src/clocktick.c
parentscore: Avoid unused variable warnings (diff)
downloadrtems-2e71aa41965e175203d9dcd8fb00fe5104d0c737.tar.bz2
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.
Diffstat (limited to 'cpukit/rtems/src/clocktick.c')
-rw-r--r--cpukit/rtems/src/clocktick.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpukit/rtems/src/clocktick.c b/cpukit/rtems/src/clocktick.c
index a6bf26d1a4..df8012e017 100644
--- a/cpukit/rtems/src/clocktick.c
+++ b/cpukit/rtems/src/clocktick.c
@@ -20,6 +20,7 @@
#include <rtems/rtems/clock.h>
#include <rtems/score/timecounter.h>
+#include <rtems/score/threadimpl.h>
rtems_status_code rtems_clock_tick( void )
{
@@ -32,5 +33,9 @@ rtems_status_code rtems_clock_tick( void )
&lock_context
);
+ if ( _Thread_Dispatch_is_enabled() ) {
+ _Thread_Dispatch();
+ }
+
return RTEMS_SUCCESSFUL;
}