From: "Mike Frysinger" <vapier.adi@gmail.com>
To: fundu_1999@yahoo.com
Cc: linux embedded <linux-embedded@vger.kernel.org>
Subject: Re: local_save_flags(flags)
Date: Thu, 18 Sep 2008 18:51:23 -0400 [thread overview]
Message-ID: <8bd0f97a0809181551u477911f6iccea3c74c6e6832d@mail.gmail.com> (raw)
In-Reply-To: <545834.68406.qm@web63405.mail.re1.yahoo.com>
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
next prev parent reply other threads:[~2008-09-18 22:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <556445368AFA1C438794ABDA8901891C098AABE6@USA0300MS03.na.xerox.net>
2008-09-18 21:09 ` local_save_flags(flags) Fundu
2008-09-18 21:15 ` local_save_flags(flags) Mike Frysinger
2008-09-18 22:05 ` local_save_flags(flags) Fundu
2008-09-18 22:07 ` local_save_flags(flags) Mike Frysinger
2008-09-18 22:45 ` local_save_flags(flags) Fundu
2008-09-18 22:51 ` Mike Frysinger [this message]
2008-09-23 20:01 ` local_save_flags(flags) Fundu
2008-09-23 23:11 ` local_save_flags(flags) Mike Frysinger
2008-09-24 1:15 ` local_save_flags(flags) Fundu
2008-09-24 1:31 ` local_save_flags(flags) Mike Frysinger
2008-09-24 17:06 ` local_save_flags(flags) Fundu
2008-09-29 3:32 ` local_save_flags(flags) Robin Getz
2008-09-19 9:52 ` local_save_flags(flags) Daniel THOMPSON
2008-09-18 18:48 local_save_flags(flags) Fundu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8bd0f97a0809181551u477911f6iccea3c74c6e6832d@mail.gmail.com \
--to=vapier.adi@gmail.com \
--cc=fundu_1999@yahoo.com \
--cc=linux-embedded@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).