public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jlarmour@redhat.com>
To: Xavier Wang <xavierwang@ms19.url.com.tw>
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] nested interrupts
Date: Thu, 18 Jan 2001 22:35:00 -0000	[thread overview]
Message-ID: <3A67E00D.89DD5CAF@redhat.com> (raw)
In-Reply-To: <00e101c081d2$c124bee0$6f2314ac@realtek.com.tw>

Xavier Wang wrote:
[snip] 
> Which step above does indeed make the kernel state safe to be called by DSRs?
> 
> For example, an interrupt occurred while a thread is running in scheduler's critical
> section. It's not safe to manipulate scheduler's data in ISR obviously, but it seems
> also not safe to access scheduler's data in DSR since the interrupted thread still
> doesn't finish its job to make the data consistent. Am I wrong here?

DSRs are not called if the scheduler was already locked *before* the
interrupt. So the running thread just gets restored in the return from the
interrupt. It is the process of unlocking the scheduler, and specifically
the scheduler lock transitioning from the 1 to 0 state that causes DSRs to
run.

The sequence of events you cited is a simplification. For detail at this
level (after all, why do you need to know how - just know it is safe), Use
The Source Luke. DSRs are called from Cyg_Scheduler::unlock_inner() in
kernel/VERSION/src/sched/sched.cxx.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Un cheval, pas du glue. Pas du cheval, beaucoup du glue. || Opinions==mine

  reply	other threads:[~2001-01-18 22:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-17 23:51 Xavier Wang
2001-01-18  1:03 ` Jesper Skov
2001-01-18  4:15   ` Xavier Wang
2001-01-18  5:00     ` Nick Garnett
2001-01-18  4:59   ` Xavier Wang
2001-01-18  5:46     ` Nick Garnett
2001-01-18 21:52       ` Xavier Wang
2001-01-18 22:35         ` Jonathan Larmour [this message]
2001-01-18  8:26   ` Sergei Slobodov
2001-01-18 20:56     ` Xavier Wang
2001-01-18 22:37       ` Jonathan Larmour
  -- strict thread matches above, loose matches on Subject: below --
2000-09-11  0:03 [ECOS] Nested Interrupts Sandeep Rikhi
2000-09-11  7:53 ` Jonathan Larmour

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=3A67E00D.89DD5CAF@redhat.com \
    --to=jlarmour@redhat.com \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=xavierwang@ms19.url.com.tw \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).