[rtems commit] genmongoosev - Correct tm27.h to use PIC Interrupt Model

Joel Sherrill joel at rtems.org
Mon May 7 22:00:29 UTC 2012


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

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Mon May  7 16:58:39 2012 -0500

genmongoosev - Correct tm27.h to use PIC Interrupt Model

---

 c/src/lib/libbsp/mips/genmongoosev/include/tm27.h |   32 ++++++---------------
 1 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/c/src/lib/libbsp/mips/genmongoosev/include/tm27.h b/c/src/lib/libbsp/mips/genmongoosev/include/tm27.h
index 52f7faf..ed33e7e 100644
--- a/c/src/lib/libbsp/mips/genmongoosev/include/tm27.h
+++ b/c/src/lib/libbsp/mips/genmongoosev/include/tm27.h
@@ -1,11 +1,11 @@
+/**
+ *  @file 
+ */
+
 /*
- *  tm27.h
- *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
  *  http://www.rtems.com/license/LICENSE.
- *
- *  $Id$
  */
 
 #ifndef _RTEMS_TMTEST27
@@ -19,32 +19,18 @@
  *  Define the interrupt mechanism for Time Test 27
  */
 
-#define MUST_WAIT_FOR_INTERRUPT 1
+#include <bsp/irq.h>
 
-#if 1
+#define MUST_WAIT_FOR_INTERRUPT 1
 
 #define Install_tm27_vector( handler ) \
-    (void) set_vector( handler, MONGOOSEV_IRQ_SOFTWARE_1, 1 );
+   rtems_interrupt_handler_install( \
+      MONGOOSEV_IRQ_SOFTWARE_1, "benchmark", 0, \
+      (rtems_interrupt_handler)handler, NULL );
 
 #define Cause_tm27_intr()   assertSoftwareInterrupt(0);
 
 #define Clear_tm27_intr() /* empty */
 #define Lower_tm27_intr() /* empty */
 
-#else
-
-#define Install_tm27_vector( handler ) \
-    (void) set_vector( handler, MONGOOSEV_IRQ_TIMER1, 1 );
-
-#define Cause_tm27_intr() \
-  do { \
-    ; \
-  } while(0)
-
-#define Clear_tm27_intr() /* empty */
-
-#define Lower_tm27_intr() /* empty */
-
-#endif
-
 #endif




More information about the vc mailing list