public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Robert Brusa <bob.brusa@gmail.com>
Cc: MailingList:  ecos-discuss <ecos-discuss@ecos.sourceware.org>;
Subject: Re: [ECOS] priority of main thread
Date: Thu, 20 Nov 2008 16:03:00 -0000	[thread overview]
Message-ID: <20081120153804.GD17925@lunn.ch> (raw)
In-Reply-To: <op.ukxbn8ajkeg3uf@localhost>

On Thu, Nov 20, 2008 at 04:22:58PM +0100, Robert Brusa wrote:
> Hi,
> in my system, I have a cyg_user_start() as well as a main() function. The 
> first includes calls to initialize various modules. main() contains an  
> eternal loop and is assumed to work as a normal thread. The problem is  
> that main produces a hanger when I call cyg_spi_transfer to read my  
> onboard-RTC. When using this RTC-module in a test program with a single  
> thread it works. It also works (in main) when I change the transfer-mode  
> to polling. This let me think that there is some kind of priority 
> problem.

I would not necessarily agree with this. If it is a priority problem,
it suggests one of the threads running with higher priority than main
is spinning, so stopping main from running. This is normally a
bug. However this does not really fit with PIO working.

This actually sounds like an interrupt problem. I would put a
breakpoint on the interrupt handler and see if it gets called.

   Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

      parent reply	other threads:[~2008-11-20 15:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-20 15:34 Robert Brusa
2008-11-20 16:02 ` Gary Thomas
2008-11-20 16:06   ` Robert Brusa
2008-11-20 18:42     ` Gary Thomas
2008-11-21 18:07       ` Jonathan Larmour
2008-11-24 11:06         ` Robert Brusa
2008-11-24 11:53           ` Robert Brusa
2008-11-24 12:57             ` Jonathan Larmour
2008-11-20 16:03 ` Andrew Lunn [this message]

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=20081120153804.GD17925@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=bob.brusa@gmail.com \
    --cc=ecos-discuss@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).