From c03e2bc8c7b6c2133db6a661d785409d4756149a Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 11 Feb 2009 21:45:05 +0000 Subject: 2009-02-11 Joel Sherrill * cpu.c, rtems/score/cpu.h: Eliminate _CPU_Thread_dispatch_pointer and passing address of _Thread_Dispatch to _CPU_Initialize. Clean up comments. --- cpukit/score/cpu/unix/ChangeLog | 6 ++++++ cpukit/score/cpu/unix/cpu.c | 21 ++------------------- cpukit/score/cpu/unix/rtems/score/cpu.h | 16 +--------------- 3 files changed, 9 insertions(+), 34 deletions(-) (limited to 'cpukit/score/cpu/unix') diff --git a/cpukit/score/cpu/unix/ChangeLog b/cpukit/score/cpu/unix/ChangeLog index c972c9d6cf..21e9de51dc 100644 --- a/cpukit/score/cpu/unix/ChangeLog +++ b/cpukit/score/cpu/unix/ChangeLog @@ -1,3 +1,9 @@ +2009-02-11 Joel Sherrill + + * cpu.c, rtems/score/cpu.h: Eliminate _CPU_Thread_dispatch_pointer and + passing address of _Thread_Dispatch to _CPU_Initialize. Clean up + comments. + 2008-12-01 Joel Sherrill * cpu.c: Links hello again. diff --git a/cpukit/score/cpu/unix/cpu.c b/cpukit/score/cpu/unix/cpu.c index e92e04b0e7..b56fadcc5e 100644 --- a/cpukit/score/cpu/unix/cpu.c +++ b/cpukit/score/cpu/unix/cpu.c @@ -276,14 +276,10 @@ uint32_t _CPU_ISR_Get_level( void ) * * This routine performs processor dependent initialization. * - * INPUT PARAMETERS: - * thread_dispatch - address of dispatching routine + * INPUT PARAMETERS: NONE */ - -void _CPU_Initialize( - void (*thread_dispatch) /* ignored on this CPU */ -) +void _CPU_Initialize(void) { /* * If something happened where the public Context_Control is not @@ -294,19 +290,6 @@ void _CPU_Initialize( if ( sizeof(Context_Control_overlay) > sizeof(Context_Control) ) _CPU_Fatal_error(0x100 + 1); - /* - * The thread_dispatch argument is the address of the entry point - * for the routine called at the end of an ISR once it has been - * decided a context switch is necessary. On some compilation - * systems it is difficult to call a high-level language routine - * from assembly. This allows us to trick these systems. - * - * If you encounter this problem save the entry point in a CPU - * dependent variable. - */ - - _CPU_Thread_dispatch_pointer = thread_dispatch; - /* * XXX; If there is not an easy way to initialize the FP context * during Context_Initialize, then it is usually easier to diff --git a/cpukit/score/cpu/unix/rtems/score/cpu.h b/cpukit/score/cpu/unix/rtems/score/cpu.h index 4734539173..0503018d2f 100644 --- a/cpukit/score/cpu/unix/rtems/score/cpu.h +++ b/cpukit/score/cpu/unix/rtems/score/cpu.h @@ -528,18 +528,6 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; SCORE_EXTERN void *_CPU_Interrupt_stack_low; SCORE_EXTERN void *_CPU_Interrupt_stack_high; -/* - * With some compilation systems, it is difficult if not impossible to - * call a high-level language routine from assembly language. This - * is especially true of commercial Ada compilers and name mangling - * C++ ones. This variable can be optionally defined by the CPU porter - * and contains the address of the routine _Thread_Dispatch. This - * can make it easier to invoke that routine at the end of the interrupt - * sequence (if a dispatch is necessary). - */ - -SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)(void); - /* * Nothing prevents the porter from declaring more CPU specific variables. */ @@ -875,9 +863,7 @@ extern void _CPU_Context_Initialize( * This routine performs CPU dependent initialization. */ -void _CPU_Initialize( - void (*thread_dispatch) -); +void _CPU_Initialize(void); /* * _CPU_ISR_install_raw_handler -- cgit v1.2.3