[rtems commit] i386: Remove use of proc_ptr

Sebastian Huber sebh at rtems.org
Mon Nov 12 14:42:10 UTC 2018


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

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

i386: Remove use of proc_ptr

Update #3585.

---

 bsps/i386/shared/irq/idt.c                      |  8 ++++----
 cpukit/score/cpu/i386/cpu.c                     |  4 ++--
 cpukit/score/cpu/i386/include/rtems/score/cpu.h | 25 ++++---------------------
 3 files changed, 10 insertions(+), 27 deletions(-)

diff --git a/bsps/i386/shared/irq/idt.c b/bsps/i386/shared/irq/idt.c
index d3adbc4..ac50fc4 100644
--- a/bsps/i386/shared/irq/idt.c
+++ b/bsps/i386/shared/irq/idt.c
@@ -104,8 +104,8 @@ int i386_set_idt_entry  (const rtems_raw_irq_connect_data* irq)
 }
 
 void _CPU_ISR_install_vector (uint32_t vector,
-			      proc_ptr hdl,
-			      proc_ptr * oldHdl)
+			      CPU_ISR_handler hdl,
+			      CPU_ISR_handler * oldHdl)
 {
     interrupt_gate_descriptor* 	idt_entry_tbl;
     unsigned			limit;
@@ -121,8 +121,8 @@ void _CPU_ISR_install_vector (uint32_t vector,
       return;
     }
     rtems_interrupt_lock_acquire(&rtems_idt_access_lock, &lock_context);
-    * ((unsigned int *) oldHdl) = idt_entry_tbl[vector].low_offsets_bits |
-	(idt_entry_tbl[vector].high_offsets_bits << 16);
+    *oldHdl = (CPU_ISR_handler) (idt_entry_tbl[vector].low_offsets_bits |
+	(idt_entry_tbl[vector].high_offsets_bits << 16));
 
     create_interrupt_gate_descriptor(&new,  hdl);
     idt_entry_tbl[vector] = new;
diff --git a/cpukit/score/cpu/i386/cpu.c b/cpukit/score/cpu/i386/cpu.c
index 72b99c0..a90eb7a 100644
--- a/cpukit/score/cpu/i386/cpu.c
+++ b/cpukit/score/cpu/i386/cpu.c
@@ -171,8 +171,8 @@ void _CPU_Context_Initialize(
 
   _stack  = ((uint32_t)(_stack_base)) + (_size);
   _stack &= ~ (CPU_STACK_ALIGNMENT - 1);
-  _stack -= 2*sizeof(proc_ptr*); /* see above for why we need to do this */
-  *((proc_ptr *)(_stack)) = (_entry_point);
+  _stack -= 2*sizeof(void *); /* see above for why we need to do this */
+  *((void (**)(void))(_stack)) = (_entry_point);
   the_context->ebp     = (void *) 0;
   the_context->esp     = (void *) _stack;
 
diff --git a/cpukit/score/cpu/i386/include/rtems/score/cpu.h b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
index d38af94..10614a7 100644
--- a/cpukit/score/cpu/i386/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
@@ -539,29 +539,12 @@ extern void _CPU_Fatal_halt(uint32_t source, uint32_t error)
 
 void _CPU_Initialize(void);
 
-/*
- *  _CPU_ISR_install_raw_handler
- *
- *  This routine installs a "raw" interrupt handler directly into the
- *  processor's vector table.
- */
-
-void _CPU_ISR_install_raw_handler(
-  uint32_t    vector,
-  proc_ptr    new_handler,
-  proc_ptr   *old_handler
-);
-
-/*
- *  _CPU_ISR_install_vector
- *
- *  This routine installs an interrupt vector.
- */
+typedef void ( *CPU_ISR_handler )( void );
 
 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