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: nested interrupts


"Xavier Wang" <xavierwang@ms19.url.com.tw> writes:

> Thanks, Jesper.
> 
> One more question. By looking into the source code, I still can't
> figure out that why DSRs can call most kernel functions but
> ISRs can't. Is it the stack problem or scheduler locking problem
> or something else?

The kernel does not block interrupts during critical sections, so an
ISR can occur at any point, even while the scheduler is manipulating
the run queues. If the ISR then tries to manipulate the same data
structures, by calling a kernel function, then they will be
corrupted. Hence the use of DSRs to defer these calls until the data
structures are in a consistent state.


-- 
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK

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