public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jlarmour@redhat.com>
To: Andrew Lunn <andrew.lunn@ascom.ch>
Cc: Geoff Patch <grp@cea.com.au>,
	"'ecos-discuss@sources.redhat.com'"
	<ecos-discuss@sources.redhat.com>
Subject: Re: [ECOS] semaphore bug??
Date: Wed, 15 Aug 2001 00:24:00 -0000	[thread overview]
Message-ID: <3B7A23B1.9FCEC18D@redhat.com> (raw)
In-Reply-To: <20010815091455.L4703@biferten.ma.tech.ascom.ch>

Andrew Lunn wrote:
> 
> On Wed, Aug 15, 2001 at 11:49:32AM +1000, Geoff Patch wrote:
> >
> > Hi Folks,
> >
> > > I don't think you can post to a semaphore from an ISR.  You'll
> > > have to run a DSR and do it there.  There's a table in the eCos
> > > Reference Manual (Device Driver Interface to the Kernel) that
> > > shows what functions may be called from an ISR.  About the only
> > > thing you can do is ack/mask/unmask interrupts and run a DSR.
> >
> > This is correct, and I recall other postings to the list about this issue.
> >  It's obviously a fairly common misconception.
> 
> How about adding an assertion check to semaphores and mutex etc. If
> they are called from within an ISR throw an assertion.

Unfortunately there is no portable way to determine if you are in an ISR.
Instead you would have to set a HAL level boolean in the interrupt VSR
before calling the ISR. And if the ISR, for whatever reason, doesn't exit
by returning, it would all go very wrong.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

  reply	other threads:[~2001-08-15  0:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-14 18:55 Geoff Patch
2001-08-15  0:15 ` Andrew Lunn
2001-08-15  0:24   ` Jonathan Larmour [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-08-14 12:21 Warren Jasper
2001-08-14 13:09 ` Grant Edwards

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=3B7A23B1.9FCEC18D@redhat.com \
    --to=jlarmour@redhat.com \
    --cc=andrew.lunn@ascom.ch \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=grp@cea.com.au \
    /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).