This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Changing system timer resolution
- From: Jesper Skov <jskov at redhat dot com>
- To: Grant Edwards <grante at visi dot com>
- Cc: Jonathan Larmour <jlarmour at redhat dot com>,Nick Garnett <nickg at redhat dot com>,eCos Discuss <ecos-discuss at sources dot redhat dot com>
- Date: 04 Dec 2001 10:20:51 +0100
- Subject: Re: [ECOS] Changing system timer resolution
- References: <NFBBJGOLDDDGJPLCMJKNCEIFCCAA.jura@intesis.hr><1006968670.7768.10.camel@hermes> <3C083779.1BA45145@redhat.com><wwgy9kkcz0r.fsf@balti.cambridge.redhat.com> <3C0B72B8.BE286B54@redhat.com> <20011203101617.B16245@visi.com>
On Mon, 2001-12-03 at 17:16, Grant Edwards wrote:
> I think we're talking about several different things at this point:
>
> 1) Changing the tick period and having everything "just work"
> 2) Providing converter routines for use when you don't know at compile
> time what the tick period is.
> 3) Providing sub-tick read-current-time resolution.
> 4) Providing sub-tick event/alarm scheduling.
>
> It sounds like 1) is already there, 2) isn't hard, 3) is already there.
>
> However, 4) is hard if you try to use the eCos clock/timer system. If
> somebody really does need 4) the easiest thing may be to use a dedicated
> hardware timer and a custom driver that maintains a linked list of
> delay/event pairs.
I think all you really need is duplicate the existing kernel RTC setup,
but use a higher frequency interrupt to drive the DSR doing the
clocking. All the infrastructure is in place - the only thing needed is
the code to setup the details (and of course the necessary interrupt
source on the platform).
The kernel 100Hz clock will still drive timeslicing - but alarm
scheduling would (I think) happen whenever the scheduler lock is
released and a new high priority thread is ready to run. All you have to
do is be careful about selecting the correct thread priorities.
Uh, or so I would think... :)
Jesper