public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Davy Wouters <davy.wouters.atos@gmail.com>
Cc: ecos-devel@ecos.sourceware.org
Subject: Re: New hal port + interrupts + rescheduling + call_pending_dsrs 	problem
Date: Fri, 27 Jun 2008 18:25:00 -0000	[thread overview]
Message-ID: <20080627182456.GH696@lunn.ch> (raw)
In-Reply-To: <111ced750806270740k430d9ca9we3f3f1bd84d65ab7@mail.gmail.com>

> I assume a return from interrupt should be executed somewhere between
> the execution of the isr/post_dsr and the call_pending_dsrs?

Nope. If the scheduler is not locked, the DSR is called in the
interrupt handler context. If the scheduler is locked, the DSR will be
called when the scheduler is unlocked.

> Is it correct that call_pending_dsrs should be executed only when
> other interrupts are allowed again, in other words after return from
> the interrupt?

After returning from the interrupt handler which has been registered
with eCos, but before the actual reti instruction, or what ever is
used to return the processor from interrupt context back into normal
context.
 
> Sorry if my questions are a bit confusing, but i don't quite
> understand the problems i'm having at this point (Crashes when having
> a lot of communication
> on my uart rx resulting in ASSERT_FAIL: <6>mutex.cxx[249]cyg_bool
> Cyg_Mutex::lock() Locking mutex I already own)

Is this crash in thread code? You are not allowed to use mutex, or any
other blocking call in ISR or DSR context. 

      Andrew

  reply	other threads:[~2008-06-27 18:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-27 14:41 Davy Wouters
2008-06-27 18:25 ` Andrew Lunn [this message]
2008-06-30  8:27   ` Davy Wouters
2008-06-30  8:48     ` Andrew Lunn

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=20080627182456.GH696@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davy.wouters.atos@gmail.com \
    --cc=ecos-devel@ecos.sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).