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]

changing the stack ptr


I'm working on the cirrus part.

I have a piece of code that needs to use all available registers. As
such, i'm storing the sp off to a seperate location and reusing it as a
normal data register. I have actually done this in the past with
moderate success (on older kernels), but i'm having some problems now.

In the past, i used the sp to point into the middle of a data structure,
the "upper" (as in >= sp) part of the structure being state data for the
routine, and the "lower" (as in < sp) part of the structure was a small
1k stack, completely unrelated to the main thread stack. So basically i
was able to use the sp register for my own purposes, but there was still
a psuedo-stack that, if my routine was interrupted, could be used to
store data on.

Using this same code on current cvs kernels i get the following
exception:

ASSERT FAIL: <3>sched.cxx           [ 170] static void
Cyg_Scheduler::unlock_inner()
                Bad next thread

I set a break in cyg_assert_fail(), and it appears that the entire stack
is hosed.

Any thoughts?

-Dan

--
Dan Conti             e danc@iobjects.com
Software Engineer     p    (425) 289 0326


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