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: cyg_current_time () locking up


On Fri, Aug 10, 2001 at 05:50:46PM +0200, Andrew Lunn wrote:
> On Fri, Aug 10, 2001 at 09:47:47AM -0600, Trenton D. Adams wrote:

> > Nope, that's not what's locking it up.  I get the error below after
> > fiddling with some of the code.  What does it mean?
> > 
> > ASSERT FAIL: <2>[166]static void Cyg_Scheduler::unlock_inner() Bad next
> > thread
> 
> At a guess, you have a stack overflow which has corrupted something
> important in one of your threads. Try making your stacks bigger.

I don't remember seeing the choice, but does eCos have an
option to check for stack overflows (e.g. during context
switches or timer interrupts)?  One of the kernels I wrote
once-upon-a-time would do that (optionally) and it proved
rather handy during development.  IIRC, we usually turned it
off before shipping code since it slowed things down a tiny
bit.

It didn't catch every case of stack overflow since it was still
possible for the program to blow up irreperably before the next
context switch or timer interrupt, but it caught enough
problems to be useful. Perhaps in the days of cheap RAM it's
not as critical. Back then RAM was tight and we ran pretty
close to line on stack sizes, and a minor change could push you
over the edge pretty easily.

-- 
Grant Edwards
grante@visi.com


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