forked from Imagelibrary/rtems
@@ -19,7 +19,7 @@
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source src,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@ static void reconf(void)
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code the_error
|
||||
)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ static rtems_isr bsp_return_to_monitor_trap(
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ static rtems_isr bsp_return_to_monitor_trap(
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ static void bsp_return_to_monitor_trap( void )
|
||||
*/
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ __attribute__(( weak, alias("_noopfun") ));
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ __attribute__(( weak, alias("_noopfun") ));
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ extern "C" {
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
void bsp_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
void MPCI_Fatal(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
@@ -436,7 +436,7 @@ static bool Stack_check_Dump_threads_usage(
|
||||
#ifndef DONT_USE_FATAL_EXTENSION
|
||||
void rtems_stack_checker_fatal_extension(
|
||||
Internal_errors_Source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
uint32_t status
|
||||
)
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ extern rtems_printer rtems_test_printer;
|
||||
*/
|
||||
void rtems_test_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ RTEMS_INTERRUPT_LOCK_DEFINE( static, report_lock, "test report" )
|
||||
|
||||
void rtems_test_fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
@@ -68,6 +68,6 @@ void rtems_test_fatal_extension(
|
||||
#endif
|
||||
|
||||
(void) source;
|
||||
(void) is_internal;
|
||||
(void) always_set_to_false;
|
||||
(void) code;
|
||||
}
|
||||
|
||||
@@ -195,14 +195,14 @@ typedef void( *User_extensions_thread_exitted_extension )(
|
||||
*
|
||||
* @param[in] source The fatal source indicating the subsystem the fatal
|
||||
* condition originated in.
|
||||
* @param[in] is_internal This parameter is always false and provide only for
|
||||
* backward compatibility reasons.
|
||||
* @param[in] always_set_to_false This parameter is always set to false and
|
||||
* provided only for backward compatibility reasons.
|
||||
* @param[in] code The fatal error code. This value must be interpreted with
|
||||
* respect to the source.
|
||||
*/
|
||||
typedef void( *User_extensions_fatal_extension )(
|
||||
Internal_errors_Source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
Internal_errors_t code
|
||||
);
|
||||
|
||||
|
||||
@@ -52,13 +52,13 @@ static void atexit_2(void)
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
if (
|
||||
source == RTEMS_FATAL_SOURCE_EXIT
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& error == EXIT_STATUS
|
||||
&& counter == 3
|
||||
) {
|
||||
|
||||
@@ -37,13 +37,13 @@ static void atexit_not_reached(void)
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
if (
|
||||
source == RTEMS_FATAL_SOURCE_EXIT
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& error == EXIT_STATUS
|
||||
) {
|
||||
TEST_END();
|
||||
|
||||
@@ -90,13 +90,13 @@ rtems_task Init(
|
||||
|
||||
void Fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
if ( source != RTEMS_FATAL_SOURCE_STACK_CHECKER ) {
|
||||
printk( "unexpected fatal source\n" );
|
||||
} else if ( is_internal ) {
|
||||
} else if ( always_set_to_false ) {
|
||||
printk( "unexpected fatal is internal\n" );
|
||||
} else if ( error != rtems_build_name( 'T', 'A', '1', ' ' ) ) {
|
||||
printk( "unexpected fatal error\n" );
|
||||
|
||||
@@ -44,7 +44,7 @@ void blow_stack( void );
|
||||
|
||||
void Fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
);
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ void Put_Source( rtems_fatal_source source )
|
||||
|
||||
void Fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
@@ -77,7 +77,7 @@ void Fatal_extension(
|
||||
printk( ")\n" );
|
||||
}
|
||||
|
||||
if ( is_internal )
|
||||
if ( always_set_to_false )
|
||||
printk( "ERROR==> Fatal Extension is internal set to true expected false\n" );
|
||||
|
||||
if ( error != FATAL_ERROR_EXPECTED_ERROR ) {
|
||||
@@ -90,7 +90,7 @@ void Fatal_extension(
|
||||
|
||||
if (
|
||||
source == FATAL_ERROR_EXPECTED_SOURCE
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& error == FATAL_ERROR_EXPECTED_ERROR
|
||||
) {
|
||||
TEST_END();
|
||||
|
||||
@@ -36,7 +36,7 @@ void *POSIX_Init(
|
||||
|
||||
void Fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
@@ -51,7 +51,7 @@ static void fatal_extension(
|
||||
if (source == RTEMS_FATAL_SOURCE_SMP) {
|
||||
uint32_t self = rtems_get_current_processor();
|
||||
|
||||
assert(!is_internal);
|
||||
assert(!always_set_to_false);
|
||||
assert(code == SMP_FATAL_SHUTDOWN);
|
||||
|
||||
if (self == main_cpu) {
|
||||
|
||||
@@ -42,14 +42,14 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
SMP_barrier_State barrier_state = SMP_BARRIER_STATE_INITIALIZER;
|
||||
uint32_t self = rtems_get_current_processor();
|
||||
|
||||
assert(!is_internal);
|
||||
assert(!always_set_to_false);
|
||||
|
||||
if ( source == RTEMS_FATAL_SOURCE_APPLICATION ) {
|
||||
uint32_t cpu;
|
||||
|
||||
@@ -67,13 +67,13 @@ static void Init( rtems_task_argument arg )
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
if (
|
||||
source == INTERNAL_ERROR_CORE
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& code == INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE
|
||||
) {
|
||||
TEST_END();
|
||||
|
||||
@@ -34,7 +34,7 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
@@ -42,7 +42,7 @@ static void fatal_extension(
|
||||
|
||||
if (
|
||||
source == RTEMS_FATAL_SOURCE_SMP
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& code == SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER
|
||||
) {
|
||||
TEST_END();
|
||||
|
||||
@@ -34,7 +34,7 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
@@ -42,7 +42,7 @@ static void fatal_extension(
|
||||
|
||||
if (
|
||||
source == RTEMS_FATAL_SOURCE_SMP
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& code == SMP_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT
|
||||
) {
|
||||
TEST_END();
|
||||
|
||||
@@ -36,13 +36,13 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
if (
|
||||
source == INTERNAL_ERROR_CORE
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& code == INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT
|
||||
) {
|
||||
TEST_END();
|
||||
|
||||
@@ -91,7 +91,7 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
@@ -99,7 +99,7 @@ static void fatal_extension(
|
||||
|
||||
if (
|
||||
source == RTEMS_FATAL_SOURCE_SMP
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& code == SMP_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED
|
||||
) {
|
||||
TEST_END();
|
||||
|
||||
@@ -25,13 +25,13 @@ rtems_task Init(rtems_task_argument argument);
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
if (
|
||||
source == RTEMS_FATAL_SOURCE_EXIT
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& error == ENOMEM
|
||||
) {
|
||||
TEST_END();
|
||||
|
||||
@@ -25,13 +25,13 @@ rtems_task Init(rtems_task_argument argument);
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
if (
|
||||
source == RTEMS_FATAL_SOURCE_EXIT
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& error == 1
|
||||
) {
|
||||
TEST_END();
|
||||
|
||||
@@ -22,13 +22,13 @@ rtems_task Init(rtems_task_argument argument);
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
if (
|
||||
source == RTEMS_FATAL_SOURCE_EXIT
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& error == 0
|
||||
) {
|
||||
TEST_END();
|
||||
|
||||
@@ -142,7 +142,7 @@ static void zero_thread_exitted(rtems_tcb *a)
|
||||
|
||||
static void zero_fatal(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
@@ -201,7 +201,7 @@ static void one_thread_exitted(rtems_tcb *a)
|
||||
|
||||
static void one_fatal(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
@@ -260,7 +260,7 @@ static void two_thread_exitted(rtems_tcb *a)
|
||||
|
||||
static void two_fatal(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
@@ -321,7 +321,7 @@ static void three_thread_exitted(rtems_tcb *a)
|
||||
|
||||
static void three_fatal(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
|
||||
@@ -61,12 +61,12 @@ static void Init( rtems_task_argument arg )
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code code
|
||||
)
|
||||
{
|
||||
rtems_test_assert( source == RTEMS_FATAL_SOURCE_EXCEPTION );
|
||||
rtems_test_assert( !is_internal );
|
||||
rtems_test_assert( !always_set_to_false );
|
||||
|
||||
rtems_exception_frame_print( (const rtems_exception_frame *) code );
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ static bool is_expected_error( rtems_fatal_code error )
|
||||
|
||||
void Fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
@@ -80,7 +80,7 @@ void Fatal_extension(
|
||||
printk( ")\n" );
|
||||
}
|
||||
|
||||
if ( is_internal )
|
||||
if ( always_set_to_false )
|
||||
printk(
|
||||
"ERROR==> Fatal Extension is internal set to true expected false\n"
|
||||
);
|
||||
@@ -97,7 +97,7 @@ void Fatal_extension(
|
||||
|
||||
if (
|
||||
source == FATAL_ERROR_EXPECTED_SOURCE
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& is_expected_error( error )
|
||||
) {
|
||||
TEST_END();
|
||||
|
||||
@@ -28,7 +28,7 @@ rtems_task Init(
|
||||
|
||||
void Fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
);
|
||||
|
||||
|
||||
@@ -35,13 +35,17 @@ void boot_card( const char *cmdline )
|
||||
|
||||
static void fatal_extension(
|
||||
Internal_errors_Source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
Internal_errors_t error
|
||||
)
|
||||
{
|
||||
TEST_BEGIN();
|
||||
|
||||
if ( source == FATAL_SOURCE && !is_internal && error == FATAL_ERROR ) {
|
||||
if (
|
||||
source == FATAL_SOURCE
|
||||
&& !always_set_to_false
|
||||
&& error == FATAL_ERROR
|
||||
) {
|
||||
TEST_END();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -689,14 +689,14 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
if (
|
||||
source == INTERNAL_ERROR_CORE
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& error == INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK
|
||||
) {
|
||||
test_context *ctx = &test_instance;
|
||||
|
||||
@@ -686,14 +686,14 @@ static void Init(rtems_task_argument arg)
|
||||
|
||||
static void fatal_extension(
|
||||
rtems_fatal_source source,
|
||||
bool is_internal,
|
||||
bool always_set_to_false,
|
||||
rtems_fatal_code error
|
||||
)
|
||||
{
|
||||
|
||||
if (
|
||||
source == INTERNAL_ERROR_CORE
|
||||
&& !is_internal
|
||||
&& !always_set_to_false
|
||||
&& error == INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK
|
||||
) {
|
||||
test_context *ctx = &test_instance;
|
||||
|
||||
Reference in New Issue
Block a user