summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-03-08 08:48:28 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-03-08 08:49:15 +0100
commit828049cb47d974fcc816a5bd8868fdaf670201a3 (patch)
treef524e3e9aaf8d20cb2c21dfb98d4819a1a622a9d
parentconfig: Remove RTEMS prefix from internal defines (diff)
downloadrtems-828049cb47d974fcc816a5bd8868fdaf670201a3.tar.bz2
sptests/sp19: Fix test output methods
Do not use fprintf() in non-fp tasks.
-rw-r--r--testsuites/sptests/sp19/init.c10
-rw-r--r--testsuites/sptests/sp19/system.h6
2 files changed, 14 insertions, 2 deletions
diff --git a/testsuites/sptests/sp19/init.c b/testsuites/sptests/sp19/init.c
index ee499fad6b..ef52f98444 100644
--- a/testsuites/sptests/sp19/init.c
+++ b/testsuites/sptests/sp19/init.c
@@ -28,13 +28,21 @@
const char rtems_test_name[] = "SP 19";
+void thread_switch_extension( Thread_Control *executing, Thread_Control *heir )
+{
+ if ( heir->is_fp ) {
+ rtems_print_printer_fprintf_putc( &rtems_test_printer );
+ } else {
+ rtems_print_printer_printk( &rtems_test_printer );
+ }
+}
+
rtems_task Init(
rtems_task_argument argument
)
{
rtems_status_code status;
- rtems_print_printer_fprintf_putc(&rtems_test_printer);
TEST_BEGIN();
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
diff --git a/testsuites/sptests/sp19/system.h b/testsuites/sptests/sp19/system.h
index f6e39c36b9..59ae0104f0 100644
--- a/testsuites/sptests/sp19/system.h
+++ b/testsuites/sptests/sp19/system.h
@@ -40,7 +40,11 @@ rtems_task Task_1(
#define CONFIGURE_MAXIMUM_TASKS 7
-#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+void thread_switch_extension( Thread_Control *, Thread_Control * );
+
+#define CONFIGURE_INITIAL_EXTENSIONS \
+ { .thread_switch = thread_switch_extension }, \
+ RTEMS_TEST_INITIAL_EXTENSION
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE