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 /cpukit/libmisc | |
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 'cpukit/libmisc')
-rw-r--r-- | cpukit/libmisc/cpuuse/cpuusagetop.c | 2 | ||||
-rw-r--r-- | cpukit/libmisc/monitor/mon-task.c | 3 | ||||
-rw-r--r-- | cpukit/libmisc/monitor/monitor.h | 3 |
3 files changed, 3 insertions, 5 deletions
diff --git a/cpukit/libmisc/cpuuse/cpuusagetop.c b/cpukit/libmisc/cpuuse/cpuusagetop.c index eaa192aa74..811a8bfa07 100644 --- a/cpukit/libmisc/cpuuse/cpuusagetop.c +++ b/cpukit/libmisc/cpuuse/cpuusagetop.c @@ -484,7 +484,7 @@ rtems_cpuusage_top_thread (rtems_task_argument arg) */ rtems_object_get_name(thread->Object.id, sizeof(name), name); if (name[0] == '\0') - snprintf(name, sizeof(name) - 1, "(%p)", thread->Start.entry_point); + snprintf(name, sizeof(name) - 1, "(%p)", thread->Start.Entry.Kinds.Numeric.entry); (*data->plugin.print)(data->plugin.context, " 0x%08" PRIx32 " | %-19s | %3" PRId32 " | %3" PRId32 " | ", diff --git a/cpukit/libmisc/monitor/mon-task.c b/cpukit/libmisc/monitor/mon-task.c index 910dd9db28..341a403ef6 100644 --- a/cpukit/libmisc/monitor/mon-task.c +++ b/cpukit/libmisc/monitor/mon-task.c @@ -25,8 +25,7 @@ rtems_monitor_task_canonical( api = rtems_thread->API_Extensions[ THREAD_API_RTEMS ]; - canonical_task->entry = rtems_thread->Start.entry_point; - canonical_task->argument = rtems_thread->Start.numeric_argument; + canonical_task->entry = rtems_thread->Start.Entry; canonical_task->stack = rtems_thread->Start.Initial_stack.area; canonical_task->stack_size = rtems_thread->Start.Initial_stack.size; canonical_task->cpu = _Per_CPU_Get_index( _Thread_Get_CPU( rtems_thread ) ); diff --git a/cpukit/libmisc/monitor/monitor.h b/cpukit/libmisc/monitor/monitor.h index ccd907b501..e2575cc931 100644 --- a/cpukit/libmisc/monitor/monitor.h +++ b/cpukit/libmisc/monitor/monitor.h @@ -95,8 +95,7 @@ typedef struct { rtems_id id; rtems_name name; /* end of common portion */ - Thread_Entry entry; - Thread_Entry_numeric_type argument; + Thread_Entry_information entry; void *stack; uint32_t stack_size; uint32_t cpu; |