# HG changeset patch # User asl # Date 1132779508 0 # Node ID 84bb9baeb0e1955605b58f5d1e2d437014156ce3 # Parent 9169038683a324aa93091694964227ad170d72ac * doc/kernel.sgml: Fix description of CYG_ISR_CALL_DSR and CYG_ISR_HANDLED. Fix example isr_function() accordingly. diff --git a/packages/kernel/current/ChangeLog b/packages/kernel/current/ChangeLog --- a/packages/kernel/current/ChangeLog +++ b/packages/kernel/current/ChangeLog @@ -1,3 +1,8 @@ +2005-11-23 Sergei Organov + + * doc/kernel.sgml: Fix description of CYG_ISR_CALL_DSR and + CYG_ISR_HANDLED. Fix example isr_function() accordingly. + 2005-10-23 Andrew Lunn * include/flag.hxx: We need thread.inl for the empty() function diff --git a/packages/kernel/current/doc/kernel.sgml b/packages/kernel/current/doc/kernel.sgml --- a/packages/kernel/current/doc/kernel.sgml +++ b/packages/kernel/current/doc/kernel.sgml @@ -4380,7 +4380,9 @@ isr_function(cyg_vector_t vector, cyg_ad … - return dsr_required ? CYG_ISR_CALL_DSR : CYG_ISR_HANDLED; + return dsr_required ? + (CYG_ISR_CALL_DSR : CYG_ISR_HANDLED) : + CYG_ISR_HANDLED; } @@ -4409,12 +4411,16 @@ normal. However eCos device drivers usua are especially important, so their ISRs will be as short as possible. -The return value of an ISR is normally one of -CYG_ISR_CALL_DSR or +The return value of an ISR is normally a bit mask containing zero, one +or both of the following bits: CYG_ISR_CALL_DSR or CYG_ISR_HANDLED. 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. An ISR is allowed to make very few kernel calls. It can manipulate the @@ -4429,8 +4435,8 @@ improves interrupt latency. cyg_DSR_t dsr If an interrupt has occurred and the ISR has returned a value -CYG_ISR_CALL_DSR, the system will call the -deferred service routine or DSR associated with this interrupt +CYG_ISR_CALL_DSR bit being set, the system +will call the deferred service routine or 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