[PATCH 3/3] sparc: Remove use of proc_ptr

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Nov 8 13:36:51 UTC 2018


Update #3585.
---
 cpukit/score/cpu/sparc/cpu.c                     | 18 +++++++++---------
 cpukit/score/cpu/sparc/include/rtems/score/cpu.h | 16 ++++++++++------
 2 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/cpukit/score/cpu/sparc/cpu.c b/cpukit/score/cpu/sparc/cpu.c
index 78ce269afb..40f85b9c4f 100644
--- a/cpukit/score/cpu/sparc/cpu.c
+++ b/cpukit/score/cpu/sparc/cpu.c
@@ -236,9 +236,9 @@ 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
 )
 {
   uint32_t               real_vector;
@@ -282,7 +282,7 @@ void _CPU_ISR_install_raw_handler(
     u32_handler =
       (slot->sethi_of_handler_to_l4 << HIGH_BITS_SHIFT) |
       (slot->jmp_to_low_of_handler_plus_l4 & LOW_BITS_MASK);
-    *old_handler = (proc_ptr) u32_handler;
+    *old_handler = (CPU_ISR_raw_handler) u32_handler;
   } else
     *old_handler = 0;
 
@@ -317,13 +317,13 @@ void _CPU_ISR_install_raw_handler(
 }
 
 void _CPU_ISR_install_vector(
-  uint32_t    vector,
-  proc_ptr    new_handler,
-  proc_ptr   *old_handler
+  uint32_t         vector,
+  CPU_ISR_handler  new_handler,
+  CPU_ISR_handler *old_handler
 )
 {
-   uint32_t   real_vector;
-   proc_ptr   ignored;
+   uint32_t            real_vector;
+   CPU_ISR_raw_handler ignored;
 
   /*
    *  Get the "real" trap number for this vector ignoring the synchronous
diff --git a/cpukit/score/cpu/sparc/include/rtems/score/cpu.h b/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
index 8c6212725d..252aa4026e 100644
--- a/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc/include/rtems/score/cpu.h
@@ -940,6 +940,8 @@ extern void _CPU_Fatal_halt(uint32_t source, uint32_t error)
  */
 void _CPU_Initialize(void);
 
+typedef void ( *CPU_ISR_raw_handler )( void );
+
 /**
  * @brief SPARC specific raw ISR installer.
  *
@@ -951,11 +953,13 @@ void _CPU_Initialize(void);
  * @param[in] old_handler will contain the old ISR handler
  */
 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
 );
 
+typedef void ( *CPU_ISR_handler )( uint32_t );
+
 /**
  * @brief SPARC specific RTEMS ISR installer.
  *
@@ -967,9 +971,9 @@ void _CPU_ISR_install_raw_handler(
  */
 
 void _CPU_ISR_install_vector(
-  uint32_t    vector,
-  proc_ptr    new_handler,
-  proc_ptr   *old_handler
+  uint32_t         vector,
+  CPU_ISR_handler  new_handler,
+  CPU_ISR_handler *old_handler
 );
 
 void *_CPU_Thread_Idle_body( uintptr_t ignored );
-- 
2.16.4




More information about the devel mailing list