[rtems commit] sparc: Remove use of proc_ptr

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


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Nov  8 06:41:15 2018 +0100

sparc: Remove use of proc_ptr

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 78ce269..40f85b9 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 8c62127..252aa40 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 );



More information about the vc mailing list