On Thu, Sep 18, 2008 at 18:45, Fundu wrote:
>> that book explicitly covers your question.  read chapter 2
>> where it
>> covers these irq functions.
>
> as i said i'm reading the book and actully i did read that chapter.
>
> for me, here's the exact line that needs clarification,
> In chapter 2, page 42 last paragraph(starts with "However, if ..." )
>
> here's the code snippet he's talking about.
> Point A:
> local_irq_disable();
> /* critical section ...*/
> local_irq_enable();
>
>
> Author say, if irg are already disabled at Point A (see snippet above) then 
> local_irq_enable() creates an unpleasant side effect of re-enabling 
> interrupts rather than restoring interrupt state.

this was the section i referred to ... but i guess it made perfect
sense to me since i'm familiar with the details

> 1) first what's the difference between re-enabling and restoring interrupt 
> state.

many irq controllers have a global enable bit.  you can restore the
interrupt mask state without toggling that bit.

> 2) so is disable interrupts twice a problem, or just enabling them when after 
> they are diabled (which sounds like how it should be ) a problem.

both are a problem.  the non-state saving version cannot be used
recursively nor in parallel to the state-saving version.
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to