[ECOS] Will unlock_inner() be called twice during Real Time Clock Interrupt in ecos?
jameshq@liverpool.ac.uk
jameshq@liverpool.ac.uk
Tue Sep 24 15:50:00 GMT 2002
Thanks you very much for pointing out my mistake.
Are the followings correct (after correcting my mistake)?
Thanks
Q1.
Does that mean: In the Real Time Clock tick interrupt ,The
unlock_inner() will **not** run in
Cyg_RealTimeClock::dsr()-->tick()-->unlock(). unlock_inner() will just
**only** called before calling to the Cyg_RealTimeClock::dsr(), and
when return from the Cyg_RealTimeClock::dsr() thread context switching
will happens on the old thread's stack.
Q2.
Does all DSR() run on the interrupt stack if a serperate interrupt
stack is in used?
Thanks a lot.
Best regards!
-----Original Message-----
From: Nick Garnett [mailto:nickg@ecoscentric.com]
Sent: Tuesday, September 24, 2002 6:56 PM
To: Qiang Huang
Cc: Ecos-Discuss
Subject: Re: [ECOS] Will unlock_inner() be called twice during Real
Time
Clock Interrupt in ecos?
"Qiang Huang" <jameshq@liverpool.ac.uk> writes:
> As I posted similar subject onto ecos mailing list before, still
hasn't be
> clearly described.
>
> Question:
> When a Real Time clock interrupt happens: clock tick.
>
> interrupt VSR --> .. --> interrupt_end() -->
Cyg_Scheduler::unlock() -->
> **unlock_inner()** --> Cyg_Interrupt::call_pending_DSRs() --> calls
to
> Cyg_RealTimeClock::dsr() --> rtc->tick( ) -->
Cyg_Scheduler::unlock()-->
> **unlock_inner()** --> now comes back again, will it turn out to be
> recursive call? or the next time it won't drops into
> Cyg_RealTimeClock::dsr() again (which one is the fact??). but seems
> unlock_inner() has been called twice during a real time clock
interrupt.
>
You missed the call in rtc->tick() to Cyg_Scheduler::lock(). Since the
scheduler lock is not being zeroed at this point
Cyg_Scheduler::unlock() will not call unlock_inner().
--
Nick Garnett - eCos Kernel Architect
http://www.eCosCentric.com/
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss
mailing list