This is the mail archive of the ecos-discuss@sourceware.org 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]

Question about Unlock


Looking at the unlock_inner method it would seem that it is possible
for calls to unlock_inner to nest.  Since the lock is set (possibly)
to 0 before the unlock_inner function returns it is possible for
another interrupt to occur forcing another call to unlock_inner to
execute on the thread stack again.  If the posted DSRs do not force a
context switch the calls to unlock_inner are nested on the current
running stack.  Given the correct timing it seems possible that nested
unlock_inner methods could result in a stack overflow.

I just wanted to make sure that my understanding is correct: it is
possible for 'continuous' interrupts to result in a Task stack
overflow (which may or may not also result in an interrupt stack
overflow depending on the stack sizes) meaning even if I have an
interrupt stack to run the interrupts and DSRs on the Task stack sizes
still need to accommodate some amount nesting interrupt/DSR overhead.

~ Corrin

-- 
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]