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]
Other format: [Raw text]

Doubt pertaining to scheduler locking in interrupt_end


hi nick,

I find the code in interrupt_end function in
kernel/current/src/intr/intr.cxx bit confusing -

externC void interrupt_end(..args...)
{
.....
#ifdef CYGPKG_KERNEL_SMP_SUPPORT
    Cyg_Scheduler::lock();
#endif
.....
#ifndef CYGIMP_KERNEL_INTERRUPTS_CHAIN
.....
#endif

#ifdef CYGDBG_KERNEL_DEBUG_GDB_THREAD_SUPPORT
.....
#endif

 // Now unlock the scheduler, which may also call DSRs
 // and cause a thread switch to happen.

 Cyg_Scheduler::unlock();
.....
}

scheduler lock is taken in the beginning of the
function only if SMP support is enabled, but it is
unlocked irrespectively!

is there anything that I am missing here??

regards
sandeep


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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