Rename is_internal to always_set_to_false

Update #2825.
This commit is contained in:
Sebastian Huber
2016-12-09 10:49:49 +01:00
parent b6606e8d99
commit 6a9282d9bb
44 changed files with 75 additions and 71 deletions

View File

@@ -19,7 +19,7 @@
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source src, rtems_fatal_source src,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {

View File

@@ -50,7 +50,7 @@ static void reconf(void)
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {

View File

@@ -19,7 +19,7 @@
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {

View File

@@ -33,7 +33,7 @@
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code the_error rtems_fatal_code the_error
) )
{ {

View File

@@ -37,7 +37,7 @@ static rtems_isr bsp_return_to_monitor_trap(
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {

View File

@@ -38,7 +38,7 @@ static rtems_isr bsp_return_to_monitor_trap(
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {

View File

@@ -61,7 +61,7 @@ static void bsp_return_to_monitor_trap( void )
*/ */
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {

View File

@@ -16,7 +16,7 @@
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {

View File

@@ -4,7 +4,7 @@
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {

View File

@@ -10,7 +10,7 @@
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {

View File

@@ -41,7 +41,7 @@ __attribute__(( weak, alias("_noopfun") ));
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {

View File

@@ -41,7 +41,7 @@ __attribute__(( weak, alias("_noopfun") ));
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {

View File

@@ -13,7 +13,7 @@
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {

View File

@@ -39,7 +39,7 @@ extern "C" {
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
); );

View File

@@ -26,7 +26,7 @@
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {

View File

@@ -14,7 +14,7 @@
void bsp_fatal_extension( void bsp_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {

View File

@@ -20,7 +20,7 @@
void MPCI_Fatal( void MPCI_Fatal(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {

View File

@@ -436,7 +436,7 @@ static bool Stack_check_Dump_threads_usage(
#ifndef DONT_USE_FATAL_EXTENSION #ifndef DONT_USE_FATAL_EXTENSION
void rtems_stack_checker_fatal_extension( void rtems_stack_checker_fatal_extension(
Internal_errors_Source source, Internal_errors_Source source,
bool is_internal, bool always_set_to_false,
uint32_t status uint32_t status
) )
{ {

View File

@@ -47,7 +47,7 @@ extern rtems_printer rtems_test_printer;
*/ */
void rtems_test_fatal_extension( void rtems_test_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
); );

View File

@@ -27,7 +27,7 @@ RTEMS_INTERRUPT_LOCK_DEFINE( static, report_lock, "test report" )
void rtems_test_fatal_extension( void rtems_test_fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {
@@ -68,6 +68,6 @@ void rtems_test_fatal_extension(
#endif #endif
(void) source; (void) source;
(void) is_internal; (void) always_set_to_false;
(void) code; (void) code;
} }

View File

@@ -195,14 +195,14 @@ typedef void( *User_extensions_thread_exitted_extension )(
* *
* @param[in] source The fatal source indicating the subsystem the fatal * @param[in] source The fatal source indicating the subsystem the fatal
* condition originated in. * condition originated in.
* @param[in] is_internal This parameter is always false and provide only for * @param[in] always_set_to_false This parameter is always set to false and
* backward compatibility reasons. * provided only for backward compatibility reasons.
* @param[in] code The fatal error code. This value must be interpreted with * @param[in] code The fatal error code. This value must be interpreted with
* respect to the source. * respect to the source.
*/ */
typedef void( *User_extensions_fatal_extension )( typedef void( *User_extensions_fatal_extension )(
Internal_errors_Source source, Internal_errors_Source source,
bool is_internal, bool always_set_to_false,
Internal_errors_t code Internal_errors_t code
); );

View File

@@ -52,13 +52,13 @@ static void atexit_2(void)
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {
if ( if (
source == RTEMS_FATAL_SOURCE_EXIT source == RTEMS_FATAL_SOURCE_EXIT
&& !is_internal && !always_set_to_false
&& error == EXIT_STATUS && error == EXIT_STATUS
&& counter == 3 && counter == 3
) { ) {

View File

@@ -37,13 +37,13 @@ static void atexit_not_reached(void)
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {
if ( if (
source == RTEMS_FATAL_SOURCE_EXIT source == RTEMS_FATAL_SOURCE_EXIT
&& !is_internal && !always_set_to_false
&& error == EXIT_STATUS && error == EXIT_STATUS
) { ) {
TEST_END(); TEST_END();

View File

@@ -90,13 +90,13 @@ rtems_task Init(
void Fatal_extension( void Fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {
if ( source != RTEMS_FATAL_SOURCE_STACK_CHECKER ) { if ( source != RTEMS_FATAL_SOURCE_STACK_CHECKER ) {
printk( "unexpected fatal source\n" ); printk( "unexpected fatal source\n" );
} else if ( is_internal ) { } else if ( always_set_to_false ) {
printk( "unexpected fatal is internal\n" ); printk( "unexpected fatal is internal\n" );
} else if ( error != rtems_build_name( 'T', 'A', '1', ' ' ) ) { } else if ( error != rtems_build_name( 'T', 'A', '1', ' ' ) ) {
printk( "unexpected fatal error\n" ); printk( "unexpected fatal error\n" );

View File

@@ -44,7 +44,7 @@ void blow_stack( void );
void Fatal_extension( void Fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
); );

View File

@@ -62,7 +62,7 @@ void Put_Source( rtems_fatal_source source )
void Fatal_extension( void Fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {
@@ -77,7 +77,7 @@ void Fatal_extension(
printk( ")\n" ); printk( ")\n" );
} }
if ( is_internal ) if ( always_set_to_false )
printk( "ERROR==> Fatal Extension is internal set to true expected false\n" ); printk( "ERROR==> Fatal Extension is internal set to true expected false\n" );
if ( error != FATAL_ERROR_EXPECTED_ERROR ) { if ( error != FATAL_ERROR_EXPECTED_ERROR ) {
@@ -90,7 +90,7 @@ void Fatal_extension(
if ( if (
source == FATAL_ERROR_EXPECTED_SOURCE source == FATAL_ERROR_EXPECTED_SOURCE
&& !is_internal && !always_set_to_false
&& error == FATAL_ERROR_EXPECTED_ERROR && error == FATAL_ERROR_EXPECTED_ERROR
) { ) {
TEST_END(); TEST_END();

View File

@@ -36,7 +36,7 @@ void *POSIX_Init(
void Fatal_extension( void Fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
); );

View File

@@ -42,7 +42,7 @@ static void Init(rtems_task_argument arg)
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {
@@ -51,7 +51,7 @@ static void fatal_extension(
if (source == RTEMS_FATAL_SOURCE_SMP) { if (source == RTEMS_FATAL_SOURCE_SMP) {
uint32_t self = rtems_get_current_processor(); uint32_t self = rtems_get_current_processor();
assert(!is_internal); assert(!always_set_to_false);
assert(code == SMP_FATAL_SHUTDOWN); assert(code == SMP_FATAL_SHUTDOWN);
if (self == main_cpu) { if (self == main_cpu) {

View File

@@ -42,14 +42,14 @@ static void Init(rtems_task_argument arg)
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {
SMP_barrier_State barrier_state = SMP_BARRIER_STATE_INITIALIZER; SMP_barrier_State barrier_state = SMP_BARRIER_STATE_INITIALIZER;
uint32_t self = rtems_get_current_processor(); uint32_t self = rtems_get_current_processor();
assert(!is_internal); assert(!always_set_to_false);
if ( source == RTEMS_FATAL_SOURCE_APPLICATION ) { if ( source == RTEMS_FATAL_SOURCE_APPLICATION ) {
uint32_t cpu; uint32_t cpu;

View File

@@ -67,13 +67,13 @@ static void Init( rtems_task_argument arg )
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {
if ( if (
source == INTERNAL_ERROR_CORE source == INTERNAL_ERROR_CORE
&& !is_internal && !always_set_to_false
&& code == INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE && code == INTERNAL_ERROR_THREAD_QUEUE_ENQUEUE_STICKY_FROM_BAD_STATE
) { ) {
TEST_END(); TEST_END();

View File

@@ -34,7 +34,7 @@ static void Init(rtems_task_argument arg)
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {
@@ -42,7 +42,7 @@ static void fatal_extension(
if ( if (
source == RTEMS_FATAL_SOURCE_SMP source == RTEMS_FATAL_SOURCE_SMP
&& !is_internal && !always_set_to_false
&& code == SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER && code == SMP_FATAL_BOOT_PROCESSOR_NOT_ASSIGNED_TO_SCHEDULER
) { ) {
TEST_END(); TEST_END();

View File

@@ -34,7 +34,7 @@ static void Init(rtems_task_argument arg)
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {
@@ -42,7 +42,7 @@ static void fatal_extension(
if ( if (
source == RTEMS_FATAL_SOURCE_SMP source == RTEMS_FATAL_SOURCE_SMP
&& !is_internal && !always_set_to_false
&& code == SMP_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT && code == SMP_FATAL_MANDATORY_PROCESSOR_NOT_PRESENT
) { ) {
TEST_END(); TEST_END();

View File

@@ -36,13 +36,13 @@ static void Init(rtems_task_argument arg)
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {
if ( if (
source == INTERNAL_ERROR_CORE source == INTERNAL_ERROR_CORE
&& !is_internal && !always_set_to_false
&& code == INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT && code == INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT
) { ) {
TEST_END(); TEST_END();

View File

@@ -91,7 +91,7 @@ static void Init(rtems_task_argument arg)
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {
@@ -99,7 +99,7 @@ static void fatal_extension(
if ( if (
source == RTEMS_FATAL_SOURCE_SMP source == RTEMS_FATAL_SOURCE_SMP
&& !is_internal && !always_set_to_false
&& code == SMP_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED && code == SMP_FATAL_START_OF_MANDATORY_PROCESSOR_FAILED
) { ) {
TEST_END(); TEST_END();

View File

@@ -25,13 +25,13 @@ rtems_task Init(rtems_task_argument argument);
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {
if ( if (
source == RTEMS_FATAL_SOURCE_EXIT source == RTEMS_FATAL_SOURCE_EXIT
&& !is_internal && !always_set_to_false
&& error == ENOMEM && error == ENOMEM
) { ) {
TEST_END(); TEST_END();

View File

@@ -25,13 +25,13 @@ rtems_task Init(rtems_task_argument argument);
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {
if ( if (
source == RTEMS_FATAL_SOURCE_EXIT source == RTEMS_FATAL_SOURCE_EXIT
&& !is_internal && !always_set_to_false
&& error == 1 && error == 1
) { ) {
TEST_END(); TEST_END();

View File

@@ -22,13 +22,13 @@ rtems_task Init(rtems_task_argument argument);
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {
if ( if (
source == RTEMS_FATAL_SOURCE_EXIT source == RTEMS_FATAL_SOURCE_EXIT
&& !is_internal && !always_set_to_false
&& error == 0 && error == 0
) { ) {
TEST_END(); TEST_END();

View File

@@ -142,7 +142,7 @@ static void zero_thread_exitted(rtems_tcb *a)
static void zero_fatal( static void zero_fatal(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {
@@ -201,7 +201,7 @@ static void one_thread_exitted(rtems_tcb *a)
static void one_fatal( static void one_fatal(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {
@@ -260,7 +260,7 @@ static void two_thread_exitted(rtems_tcb *a)
static void two_fatal( static void two_fatal(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {
@@ -321,7 +321,7 @@ static void three_thread_exitted(rtems_tcb *a)
static void three_fatal( static void three_fatal(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {

View File

@@ -61,12 +61,12 @@ static void Init( rtems_task_argument arg )
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code code rtems_fatal_code code
) )
{ {
rtems_test_assert( source == RTEMS_FATAL_SOURCE_EXCEPTION ); 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 ); rtems_exception_frame_print( (const rtems_exception_frame *) code );

View File

@@ -65,7 +65,7 @@ static bool is_expected_error( rtems_fatal_code error )
void Fatal_extension( void Fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {
@@ -80,7 +80,7 @@ void Fatal_extension(
printk( ")\n" ); printk( ")\n" );
} }
if ( is_internal ) if ( always_set_to_false )
printk( printk(
"ERROR==> Fatal Extension is internal set to true expected false\n" "ERROR==> Fatal Extension is internal set to true expected false\n"
); );
@@ -97,7 +97,7 @@ void Fatal_extension(
if ( if (
source == FATAL_ERROR_EXPECTED_SOURCE source == FATAL_ERROR_EXPECTED_SOURCE
&& !is_internal && !always_set_to_false
&& is_expected_error( error ) && is_expected_error( error )
) { ) {
TEST_END(); TEST_END();

View File

@@ -28,7 +28,7 @@ rtems_task Init(
void Fatal_extension( void Fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
); );

View File

@@ -35,13 +35,17 @@ void boot_card( const char *cmdline )
static void fatal_extension( static void fatal_extension(
Internal_errors_Source source, Internal_errors_Source source,
bool is_internal, bool always_set_to_false,
Internal_errors_t error Internal_errors_t error
) )
{ {
TEST_BEGIN(); TEST_BEGIN();
if ( source == FATAL_SOURCE && !is_internal && error == FATAL_ERROR ) { if (
source == FATAL_SOURCE
&& !always_set_to_false
&& error == FATAL_ERROR
) {
TEST_END(); TEST_END();
} }
} }

View File

@@ -689,14 +689,14 @@ static void Init(rtems_task_argument arg)
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {
if ( if (
source == INTERNAL_ERROR_CORE source == INTERNAL_ERROR_CORE
&& !is_internal && !always_set_to_false
&& error == INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK && error == INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK
) { ) {
test_context *ctx = &test_instance; test_context *ctx = &test_instance;

View File

@@ -686,14 +686,14 @@ static void Init(rtems_task_argument arg)
static void fatal_extension( static void fatal_extension(
rtems_fatal_source source, rtems_fatal_source source,
bool is_internal, bool always_set_to_false,
rtems_fatal_code error rtems_fatal_code error
) )
{ {
if ( if (
source == INTERNAL_ERROR_CORE source == INTERNAL_ERROR_CORE
&& !is_internal && !always_set_to_false
&& error == INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK && error == INTERNAL_ERROR_THREAD_QUEUE_DEADLOCK
) { ) {
test_context *ctx = &test_instance; test_context *ctx = &test_instance;