diff packages/kernel/current/include/intr.hxx @ 2266:13625e7b9d1f

Implement FIFO variant of scheduling of DSRs and make it the default. This is reworked patch originally suggested by Stefan Sommerfeld <sommerfeld@mikrom.com>. * cdl/interrupts.cdl (CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST): make it cdl_component. * cdl/interrupts.cdl (CYGSEM_KERNEL_INTERRUPTS_DSRS_LIST_FIFO): new option for CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST. * include/intr.hxx (class Cyg_Interrupt): new static variable dsr_list_tail. * src/intr/intr.cxx (call_pending_DSRs_inner): add CYGSEM_KERNEL_INTERRUPTS_DSRS_LIST_FIFO variant. (post_dsr): likewise. * tests/intr0.cxx: fix comments to match actual option names. * tests/kintr0.c: likewise.2006-03-27 Marco Cruz <marco@daruma.com.br>
author nickg
date Fri, 11 Aug 2006 09:29:31 +0000
parents d2c90368aeef
children 74dbf4c3f2e1
line wrap: on
line diff
--- a/packages/kernel/current/include/intr.hxx
+++ b/packages/kernel/current/include/intr.hxx
@@ -195,11 +195,17 @@ class Cyg_Interrupt
     // next DSR in list
     Cyg_Interrupt* volatile next_dsr CYGBLD_ANNOTATE_VARIABLE_INTR; 
 
-    // static list of pending DSRs
+    // head of static list of pending DSRs
     static Cyg_Interrupt* volatile dsr_list[CYGNUM_KERNEL_CPU_MAX]
                                            CYGBLD_ANNOTATE_VARIABLE_INTR;
-    
-#endif
+
+#  ifdef CYGSEM_KERNEL_INTERRUPTS_DSRS_LIST_FIFO
+    // tail of static list of pending DSRs
+    static Cyg_Interrupt* volatile dsr_list_tail[CYGNUM_KERNEL_CPU_MAX]
+                                           CYGBLD_ANNOTATE_VARIABLE_INTR;
+#  endif
+
+#endif  // defined  CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST
 
 #ifdef CYGIMP_KERNEL_INTERRUPTS_CHAIN