]> git.kernelconcepts.de Git - karo-tx-redboot.git/blobdiff - packages/kernel/v2_0/doc/kernel.sgml
unified MX27, MX25, MX37 trees
[karo-tx-redboot.git] / packages / kernel / v2_0 / doc / kernel.sgml
index 694ecafee11d262e7652d519521b9c2d3950289b..79eb1502f15d49371c34e54a4a47c268b5c6f6eb 100644 (file)
@@ -1244,7 +1244,7 @@ cyg_start( void )
     …
     cyg_thread_create( …,
                       &fred::static_thread_aux,
-                      static_cast<cyg_addrword_t>(&instance),
+                      reinterpret_cast<cyg_addrword_t>(&instance),
                       …);
     …
 }
@@ -4380,7 +4380,9 @@ isr_function(cyg_vector_t vector, cyg_addrword_t data)
 
     …
 
-    return dsr_required ? CYG_ISR_CALL_DSR : CYG_ISR_HANDLED;
+    return dsr_required ?
+        (CYG_ISR_CALL_DSR | CYG_ISR_HANDLED) :
+        CYG_ISR_HANDLED;
 }
           </programlisting>
           <para>
@@ -4409,12 +4411,16 @@ normal. However eCos device drivers usually will not assume that they
 are especially important, so their ISRs will be as short as possible.
           </para>
           <para>
-The return value of an ISR is normally one of
-<literal>CYG_ISR_CALL_DSR</literal> or
+The return value of an ISR is normally a bit mask containing zero, one
+or both of the following bits: <literal>CYG_ISR_CALL_DSR</literal> or
 <literal>CYG_ISR_HANDLED</literal>. The former indicates that further
 processing is required at DSR level, and the interrupt handler's DSR
 will be run as soon as possible. The latter indicates that the
-interrupt has been fully handled and no further effort is required.
+interrupt was handled by this ISR so there is no need to call other
+interrupt handlers which might be chained on this interrupt vector. If
+this ISR did not handle the interrupt it should not set the
+CYG_ISR_HANDLED bit so that other chained interrupt handlers may
+handle the interrupt.
           </para>
           <para>
 An ISR is allowed to make very few kernel calls. It can manipulate the
@@ -4429,8 +4435,8 @@ improves interrupt latency.
           <term>cyg_DSR_t <parameter>dsr</parameter></term>
           <listitem><para>
 If an interrupt has occurred and the ISR has returned a value
-<literal>CYG_ISR_CALL_DSR</literal>, the system will call the
-deferred service routine or DSR associated with this interrupt
+with <literal>CYG_ISR_CALL_DSR</literal> bit being set, the system
+will call the DSR associated with this interrupt
 handler. If the scheduler is not currently locked then the DSR will
 run immediately. However if the interrupted thread was in the middle
 of a kernel call and had locked the scheduler, then the DSR will be