forked from Imagelibrary/rtems
sptests/sp19: Fix test output methods
Do not use fprintf() in non-fp tasks.
This commit is contained in:
@@ -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', ' ' );
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user