public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Davies, Greg" <Greg.Davies@Ultra-UEMS.com>
To: <ecos-discuss@sources.redhat.com>
Subject: [ECOS] Pthread problem
Date: Thu, 14 Feb 2008 13:10:00 -0000	[thread overview]
Message-ID: <A25DBA3B0717824BAFD61F81242D5DBDE1A868@exchange.Ultra-UEMS.ca> (raw)

Hi,
	I'm having problems when I try to run more than two pthreads at
the same time. This is on a SAM7SE-EK board using the SAM7S-EK eCos
configuration. 

	The threads start up correctly and I hit the main loop of all of
them. Inside each main loop is a sched_yield() after it's done the main
work. After the last thread yields, control never returns to one of my
threads. I tried taking out all the yields, and letting ecos' preemption
take care of when to switch context, but when I do that, I only ever hit
the main loop of one of my threads. I also thought it might be a problem
with the priority of the created threads being lower than that of the
idle thread, but I haven't explored that possibility yet. 

	Is there something different about the way pthreads work in eCos
(the same code ran in linux)? I using the library the way I should be,
should I be sleeping instead of yielding? Could there be a configuration
item that could be causing this?

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

             reply	other threads:[~2008-02-14 13:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-14 13:10 Davies, Greg [this message]
2008-02-14 19:22 ` Enno Lübbers
2008-02-15  2:28 ` Andrew Lunn
2008-02-15 20:10   ` Davies, Greg
2008-02-15 11:43 Davies, Greg
2008-02-15 20:19 ` Gary Thomas
2008-02-15 20:46   ` Davies, Greg
2008-02-15 20:51     ` Gary Thomas

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=A25DBA3B0717824BAFD61F81242D5DBDE1A868@exchange.Ultra-UEMS.ca \
    --to=greg.davies@ultra-uems.com \
    --cc=ecos-discuss@sources.redhat.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).