public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Hugo Tyson <hmt@redhat.com>
To: ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] RedBoot network timer question
Date: Fri, 19 Jan 2001 10:45:00 -0000	[thread overview]
Message-ID: <wwtd7dj9yf2.fsf@masala.cambridge.redhat.com> (raw)
In-Reply-To: <20010119102739.B10765@visi.com>


Grant Edwards <grante@visi.com> writes:
> On Thu, Jan 18, 2001 at 04:35:42PM -0700, Gary Thomas wrote:

> Right. That's how my hal_delay_us() routine works: it monitors
> a hardware timer. But, it doesn't return until the timer times

Which is a good implementation.
 
> out, so no other code is running during delays.  

(unless it is preempted by a clock or timer interrupt, I assume)

> Do some implementations of hal_delay_us() call some sort of
> "idle task" routine that does tcp_polling or other useful stuff
> while waiting for the timer to time out?  I looked at most of
> the other ARM hal sources before I did mine, and all of the
> hal_delay_us() routines just sat in a loop until the requested
> amount of time had passed -- none of them called anything.

AFAIK they all just loop.  They're intended for use only with small
numbers, y'know?  Ie. where lame device hardware documents that valid
status will only be available 8uS after the select register is diddled.  Or
for doing the timing pulses for driving-by-hand a nasty serial EEPROM that
holds a MAC address for an ethernet interface.  That sort of thing.  Where
the busy-wait doesn't matter for such short times.

I suppose one could argue that there's a functionality gap in that we don't
support an efficient (ie. yields the CPU) wait in the 100uS-1mS range.  But
OTOH, is there a need?

Usually it's either retry timeouts that are in the RFC as whole seconds, or
dodgy hardware that needs its hand holding very closely in the few uS
scale, in my experience.

	- Huge

  reply	other threads:[~2001-01-19 10:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-18 14:57 Grant Edwards
2001-01-18 15:35 ` Gary Thomas
2001-01-19  8:23   ` Grant Edwards
2001-01-19 10:45     ` Hugo Tyson [this message]
2001-01-19 11:29       ` Grant Edwards
2001-01-19 13:33     ` [ECOS] No simulator in gdb target list Sergei Slobodov
2001-01-21 10:18       ` Jonathan Larmour

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=wwtd7dj9yf2.fsf@masala.cambridge.redhat.com \
    --to=hmt@redhat.com \
    --cc=ecos-discuss@sourceware.cygnus.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).