summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spcontext01/init.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-06-09 09:28:36 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-06-09 09:28:36 +0200
commitb88d346fbde59dcdee428f224ff1c3a01419dabe (patch)
treec68fe93ac4613992f1d5917340b7d59131a2f587 /testsuites/sptests/spcontext01/init.c
parentsparc: Add SPARC_USE_SAFE_FP_SUPPORT (diff)
downloadrtems-b88d346fbde59dcdee428f224ff1c3a01419dabe.tar.bz2
sptests/spcontext01: Add second volatile clobber
Do a volatile clobber in the context switch extension to cover the path through _Thread_Do_dispatch() invoked after interrupt processing.
Diffstat (limited to '')
-rw-r--r--testsuites/sptests/spcontext01/init.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/testsuites/sptests/spcontext01/init.c b/testsuites/sptests/spcontext01/init.c
index 67910c41c8..e093c50618 100644
--- a/testsuites/sptests/spcontext01/init.c
+++ b/testsuites/sptests/spcontext01/init.c
@@ -274,6 +274,13 @@ static void Init(rtems_task_argument arg)
rtems_test_exit(0);
}
+static void switch_extension(Thread_Control *executing, Thread_Control *heir)
+{
+ uintptr_t pattern = (uintptr_t) 0xffffffffffffffffU;
+
+ _CPU_Context_volatile_clobber(pattern);
+}
+
#define CONFIGURE_MICROSECONDS_PER_TICK 1000
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
@@ -282,7 +289,9 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_MAXIMUM_TASKS 4
#define CONFIGURE_MAXIMUM_TIMERS 1
-#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+#define CONFIGURE_INITIAL_EXTENSIONS \
+ { .thread_switch = switch_extension }, \
+ RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE