public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: James Yates <j.yates@quartzuk.com>
Cc: "Ecos Discuss (E-mail)" <ecos-discuss@sources.redhat.com>
Subject: Re: [ECOS] Scheduler problems, thread delay
Date: Tue, 21 Oct 2003 14:30:00 -0000	[thread overview]
Message-ID: <20031021143033.GA20070@lunn.ch> (raw)
In-Reply-To: <CB39E7B8FC98924D85DFBED207E4CC98344218@ip02.quartzelec.adsl.gxn.net>

On Tue, Oct 21, 2003 at 03:23:44PM +0100, James Yates wrote:
> I have been having problems trying to get timeslicing to work.

> I have successfully created a two threaded app, both at the same
> priority, one waits on a semaphore, one it gets it, it flashes a led
> and posts a semaphore that the other is waiting for etc etc.  This
> all works fine and I can have 2 threads flashing 2 different leds,
> continually giving control to each other by 2 semaphores.  I tried
> removing the semaphores and placing a small delay after each LED
> flash to see if the two threads would each be allowed to run. This
> didn't work and after some investigation, when I make a call to
> cyg_thread_delay, this never seems to return and so hangs.  I have
> read lots in the archives of the mailing lists regarding similar
> problems but nothing seems to work.  I have tried running some of
> the tests, basic and context HAL tests run. I tried running some of
> the kernel tests, bin_sem2 failed. I looked into the code for the
> test and have traced it hanging at a call to cyg_thread_delay.

Its probably your clock is broken. Try running the clock* tests.
Check your setup of the timer, make sure you are getting timer
interrupts etc.
 
> Strangely, I have also tried testing hal_delay_us which works and provides me with the correct delay.

This busy waits so does not need interrupts.

     Andrew

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

  parent reply	other threads:[~2003-10-21 14:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-21 14:22 James Yates
2003-10-21 14:28 ` Gary Thomas
2003-10-21 14:30 ` Andrew Lunn [this message]
2003-10-21 15:10 James Yates
2003-10-21 16:19 James Yates

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=20031021143033.GA20070@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=j.yates@quartzuk.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).