This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: role of RTC


Arnaud Mouiche wrote:
> 
> we can see that each processor port defines those functions (in the
> 'xxxx_misc.c' file):
> 
> - void hal_clock_initialize(cyg_uint32 period)
> - void hal_clock_read(cyg_uint32 *pvalue)
> - void hal_delay_us(cyg_int32 usecs)
> 
> what kind of timer should a processor use to define correctly those functions ?

One that can deliver a regular interrupt after a specified time.

> what is the link between the RTC and the scheduler. If there is one, where
> is it defined ?

Each platform defines CYGNUM_HAL_INTERRUPT_RTC which indicates which
interrupt is used for the kernel RTC. The kernel then attaches to that
interrupt, initializes the clock with hal_clock_initialize, and then just
has to wait for the interrupts.
 
> where is defined the time slicing of the scheduler ?

kernel/VERSION/src/common/clock.cxx has the real time clock stuff. Look at
the end of the file. The RTC DSR calls the scheduler timeslice function.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]