diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-01-07 09:55:45 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-01-11 08:47:01 +0100 |
commit | ccd54344d904b657123e4e4ba795a32212382be2 (patch) | |
tree | d490d77b6173f586137036ed07ec5bd27d8ca65a /testsuites | |
parent | smptests/README: Delete obsolete information (diff) | |
download | rtems-ccd54344d904b657123e4e4ba795a32212382be2.tar.bz2 |
score: Introduce Thread_Entry_information
This avoids potential dead code in _Thread_Handler(). It gets rid of
the dangerous function pointer casts.
Update #2514.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/samples/minimum/init.c | 11 | ||||
-rw-r--r-- | testsuites/sptests/sp54/init.c | 9 | ||||
-rw-r--r-- | testsuites/sptests/spintrcritical_support/intrcritical.c | 4 |
3 files changed, 8 insertions, 16 deletions
diff --git a/testsuites/samples/minimum/init.c b/testsuites/samples/minimum/init.c index 0823a73940..65efad2b5d 100644 --- a/testsuites/samples/minimum/init.c +++ b/testsuites/samples/minimum/init.c @@ -20,18 +20,15 @@ #include <bsp.h> #include <rtems/score/thread.h> -/* forward declarations to avoid warnings */ -rtems_task Init(rtems_task_argument argument); - -rtems_task Init( - rtems_task_argument ignored -) +static void *Init( uintptr_t ignored ) { /* initialize application */ /* Real application would call idle loop functionality */ /* but in this case, just return and fall into a fatal error */ + + return NULL; } /* configuration information */ @@ -98,7 +95,7 @@ rtems_task Init( * In this application, the initialization task performs the system * initialization and then transforms itself into the idle task. */ -#define CONFIGURE_IDLE_TASK_BODY (Thread_Entry_numeric) Init +#define CONFIGURE_IDLE_TASK_BODY Init #define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION /* diff --git a/testsuites/sptests/sp54/init.c b/testsuites/sptests/sp54/init.c index 97dffa239f..3b0d4589a9 100644 --- a/testsuites/sptests/sp54/init.c +++ b/testsuites/sptests/sp54/init.c @@ -22,12 +22,7 @@ const char rtems_test_name[] = "SP 54"; -/* forward declarations to avoid warnings */ -rtems_task Init(rtems_task_argument argument); - -rtems_task Init( - rtems_task_argument ignored -) +static void *Init( uintptr_t ignored ) { rtems_status_code status; rtems_task_priority pri; @@ -68,7 +63,7 @@ rtems_task Init( * In this application, the initialization task performs the system * initialization and then transforms itself into the idle task. */ -#define CONFIGURE_IDLE_TASK_BODY (Thread_Entry_numeric) Init +#define CONFIGURE_IDLE_TASK_BODY Init #define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION /* diff --git a/testsuites/sptests/spintrcritical_support/intrcritical.c b/testsuites/sptests/spintrcritical_support/intrcritical.c index 7cea9adeb8..b831cf148f 100644 --- a/testsuites/sptests/spintrcritical_support/intrcritical.c +++ b/testsuites/sptests/spintrcritical_support/intrcritical.c @@ -175,8 +175,8 @@ bool interrupt_critical_section_test_support_delay(void) static bool is_idle( const Thread_Control *thread ) { - return thread->Start.entry_point - == (Thread_Entry) rtems_configuration_get_idle_task(); + return thread->Start.Entry.Kinds.Idle.entry + == rtems_configuration_get_idle_task(); } static void thread_switch( Thread_Control *executing, Thread_Control *heir ) |