From ccd54344d904b657123e4e4ba795a32212382be2 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 7 Jan 2016 09:55:45 +0100 Subject: score: Introduce Thread_Entry_information This avoids potential dead code in _Thread_Handler(). It gets rid of the dangerous function pointer casts. Update #2514. --- cpukit/libmisc/cpuuse/cpuusagetop.c | 2 +- cpukit/libmisc/monitor/mon-task.c | 3 +-- cpukit/libmisc/monitor/monitor.h | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'cpukit/libmisc') 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; -- cgit v1.2.3