public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Sergei Slobodov <sergei@slobodov.com>
To: ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] interrupts always enabled in scheduler
Date: Tue, 16 Jan 2001 20:31:00 -0000	[thread overview]
Message-ID: <3A651FEE.2090001@slobodov.com> (raw)
In-Reply-To: <3A64F30F.D5D06970@redhat.com>

Thanks! That makes sense. I assumed that since the config tool allows 
configuration with kernel but without DSRs, eCos ISR is allowed to 
resume or suspend a thread directly, without resorting to DSR. If this 
assumption is wrong, why is  including kernel without DSR support not  
flagged as a configuration conflict?

Thanks,
Sergei Slobodov
Caracal Consulting Inc.

Jonathan Larmour wrote:

> Sergei Slobodov wrote:
> 
>> I'm looking through the sources, trying to determine whether we should
>> try to use ecos or port our own kernel from another platform, and there
>> is at least one major issue I don't understand. ECOS seems to support
>> nested interrupts, yet there is no interrupt enable/disable pair around
>> the code that manipulates thread queues, such as Cyg_Thread::resume(),
>> which non-atomically changes global scheduler structures. Woudn't it
>> cause data corruption if a higher priority interrupt occurs in the
>> middle of resume() call?
> 
> 
> eCos has been designed to disable interrupts as infrequently as possible.
> No interrupt handler (ISR) will change the thread queues directly. The only
> protection needed is that provided by the scheduler lock ( which is locked
> using Cyg_Scheduler::lock()) which prevents pre-emption by other threads,
> _and_ pre-emption by a deferred service routine (DSR) which is the portion
> of the interrupt handling system which *is* allowed to change the thread
> queues. Only one DSR runs at a time, and these are scheduled outside of
> threads, i.e. no threads run while a DSR runs.
> 
> Jifl


  reply	other threads:[~2001-01-16 20:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-16 14:45 Sergei Slobodov
2001-01-16 17:19 ` Jonathan Larmour
2001-01-16 20:31   ` Sergei Slobodov [this message]
2001-01-16 23:04     ` 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=3A651FEE.2090001@slobodov.com \
    --to=sergei@slobodov.com \
    --cc=ecos-discuss@sourceware.cygnus.com \
    /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).