[rtems commit] sparc64: Remove use of proc_ptr

Sebastian Huber sebh at rtems.org
Mon Nov 12 14:43:27 UTC 2018


Module:    rtems
Branch:    master
Commit:    70928bc98bc40e82394e714013ffdac29732ad2e
Changeset: http://git.rtems.org/rtems/commit/?id=70928bc98bc40e82394e714013ffdac29732ad2e

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Nov  9 08:12:49 2018 +0100

sparc64: Remove use of proc_ptr

Update #3585.

---

 cpukit/score/cpu/sparc64/cpu.c                     | 18 ++++++++--------
 cpukit/score/cpu/sparc64/include/rtems/score/cpu.h | 25 +++++++---------------
 2 files changed, 17 insertions(+), 26 deletions(-)

diff --git a/cpukit/score/cpu/sparc64/cpu.c b/cpukit/score/cpu/sparc64/cpu.c
index f39882b..dcf5c8f 100644
--- a/cpukit/score/cpu/sparc64/cpu.c
+++ b/cpukit/score/cpu/sparc64/cpu.c
@@ -192,9 +192,9 @@ uint32_t   _CPU_ISR_Get_level( void )
  *  address.
  */
 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;
@@ -251,7 +251,7 @@ void _CPU_ISR_install_raw_handler(
       (slot->or_g2_hm_handler_to_g2 & IMM_MASK))) << HM_BITS_SHIFT) |
       ((slot->sethi_of_handler_to_g3 << HI_BITS_SHIFT) |
       (slot->jmp_to_low_of_handler_plus_g3 & IMM_MASK));
-    *old_handler = (proc_ptr) u64_handler;
+    *old_handler = (CPU_ISR_raw_handler) u64_handler;
   } else
     *old_handler = 0;
 
@@ -307,13 +307,13 @@ void _CPU_ISR_install_raw_handler(
  *    *old_handler - former ISR for this vector number
  */
 void _CPU_ISR_install_vector(
-  uint64_t    vector,
-  proc_ptr    new_handler,
-  proc_ptr   *old_handler
+  uint32_t         vector,
+  CPU_ISR_handler  new_handler,
+  CPU_ISR_handler *old_handler
 )
 {
-   uint64_t   real_vector;
-   proc_ptr   ignored;
+   uint64_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/sparc64/include/rtems/score/cpu.h b/cpukit/score/cpu/sparc64/include/rtems/score/cpu.h
index c25226a..84cb586 100644
--- a/cpukit/score/cpu/sparc64/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc64/include/rtems/score/cpu.h
@@ -839,29 +839,20 @@ void _CPU_Context_Initialize(
 
 void _CPU_Initialize(void);
 
-/*
- *  _CPU_ISR_install_raw_handler
- *
- *  This routine installs new_handler to be directly called from the trap
- *  table.
- */
+typedef void ( *CPU_ISR_raw_handler )( 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
 );
 
-/*
- *  _CPU_ISR_install_vector
- *
- *  This routine installs an interrupt vector.
- */
+typedef void ( *CPU_ISR_handler )( uint32_t );
 
 void _CPU_ISR_install_vector(
-  uint64_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 );




More information about the vc mailing list