diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-11-08 15:05:22 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-11-12 13:25:43 +0100 |
commit | 54c5ffca4fbb949a4df74dc4ad1fd54ea263e43f (patch) | |
tree | e46f4a3b4ee73145a6a1546462bd6983618536c9 /cpukit/score | |
parent | nios2: Remove use of proc_ptr (diff) | |
download | rtems-54c5ffca4fbb949a4df74dc4ad1fd54ea263e43f.tar.bz2 |
or1k: Remove use of proc_ptr
Update #3585.
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/cpu/or1k/cpu.c | 22 | ||||
-rw-r--r-- | cpukit/score/cpu/or1k/include/rtems/score/cpu.h | 41 |
2 files changed, 24 insertions, 39 deletions
diff --git a/cpukit/score/cpu/or1k/cpu.c b/cpukit/score/cpu/or1k/cpu.c index b4cbe00f9b..75abb2f3f0 100644 --- a/cpukit/score/cpu/or1k/cpu.c +++ b/cpukit/score/cpu/or1k/cpu.c @@ -69,22 +69,14 @@ uint32_t _CPU_ISR_Get_level( void ) } void _CPU_ISR_install_raw_handler( - uint32_t vector, - proc_ptr new_handler, - proc_ptr *old_handler + uint32_t vector, + CPU_ISR_raw_handler new_handler, + CPU_ISR_raw_handler *old_handler ) { -} - -void _CPU_ISR_install_vector( - uint32_t vector, - proc_ptr new_handler, - proc_ptr *old_handler -) -{ - proc_ptr *table = - (proc_ptr *) bsp_start_vector_table_begin; - proc_ptr current_handler; + CPU_ISR_raw_handler *table = + (CPU_ISR_raw_handler *) bsp_start_vector_table_begin; + CPU_ISR_raw_handler current_handler; ISR_Level level; @@ -94,7 +86,7 @@ void _CPU_ISR_install_vector( /* The current handler is now the old one */ if (old_handler != NULL) { - *old_handler = (proc_ptr) current_handler; + *old_handler = current_handler; } /* Write only if necessary to avoid writes to a maybe read-only memory */ diff --git a/cpukit/score/cpu/or1k/include/rtems/score/cpu.h b/cpukit/score/cpu/or1k/include/rtems/score/cpu.h index 8d66ccf522..0d1566a0c9 100644 --- a/cpukit/score/cpu/or1k/include/rtems/score/cpu.h +++ b/cpukit/score/cpu/or1k/include/rtems/score/cpu.h @@ -590,35 +590,28 @@ void _CPU_Initialize( void ); -/* - * _CPU_ISR_install_raw_handler - * - * This routine installs a "raw" interrupt handler directly into the - * processor's vector table. - * - */ +typedef void ( *CPU_ISR_raw_handler )( uint32_t, CPU_Exception_frame * ); void _CPU_ISR_install_raw_handler( - uint32_t vector, - proc_ptr new_handler, - proc_ptr *old_handler + uint32_t vector, + CPU_ISR_raw_handler new_handler, + CPU_ISR_raw_handler *old_handler ); -/* - * _CPU_ISR_install_vector - * - * This routine installs an interrupt vector. - * - * NO_CPU Specific Information: - * - * XXX document implementation including references if appropriate - */ +typedef void ( *CPU_ISR_handler )( uint32_t ); -void _CPU_ISR_install_vector( - uint32_t vector, - proc_ptr new_handler, - proc_ptr *old_handler -); +RTEMS_INLINE_ROUTINE void _CPU_ISR_install_vector( + uint32_t vector, + CPU_ISR_handler new_handler, + CPU_ISR_handler *old_handler +) +{ + _CPU_ISR_install_raw_handler( + vector, + (CPU_ISR_raw_handler) new_handler, + (CPU_ISR_raw_handler *) old_handler + ); +} void *_CPU_Thread_Idle_body( uintptr_t ignored ); |