diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-21 11:29:01 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-22 09:40:23 +0100 |
commit | 15e19273b2a6ebda3b2d55b28d693e7b8a0740b2 (patch) | |
tree | 4fb0c67c21f6f9f947e5400fc0a40e03acff00eb /testsuites | |
parent | INTERNAL_ERROR_POSIX_INIT_THREAD_ENTRY_IS_NULL (diff) | |
download | rtems-15e19273b2a6ebda3b2d55b28d693e7b8a0740b2.tar.bz2 |
sapi: New implementation of rtems_panic()
The previous rtems_panic() implementation was quite heavy weight. It
depended on _exit() which calls the global destructors. It used
fprintf(stderr, ...) for output which depends on an initialized console
device and the complex fprintf().
Introduce a new fatal source RTEMS_FATAL_SOURCE_PANIC for rtems_panic()
and output via vprintk().
Update #3244.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/sptests/sperror03/init.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/testsuites/sptests/sperror03/init.c b/testsuites/sptests/sperror03/init.c index f4323a5001..ad42d96a47 100644 --- a/testsuites/sptests/sperror03/init.c +++ b/testsuites/sptests/sperror03/init.c @@ -16,8 +16,7 @@ const char rtems_test_name[] = "SPERROR 3"; -/* forward declarations to avoid warnings */ -rtems_task Init(rtems_task_argument argument); +static const char fmt[] = "Dummy panic\n"; static void fatal_extension( rtems_fatal_source source, @@ -26,24 +25,20 @@ static void fatal_extension( ) { if ( - source == RTEMS_FATAL_SOURCE_EXIT + source == RTEMS_FATAL_SOURCE_PANIC && !always_set_to_false - && error == 0 + && error == (rtems_fatal_code) fmt ) { TEST_END(); } } -rtems_task Init( +static rtems_task Init( rtems_task_argument argument ) { TEST_BEGIN(); - - rtems_panic( - "Dummy panic\n" - ); - + rtems_panic( fmt ); rtems_test_assert(0); } |