Tech Support > Computer Hardware > Microprocessors > RTX-51 Full reentrant stack problem
RTX-51 Full reentrant stack problem
Posted by Bruce on April 26th, 2006


Has anyone had a problem with the RTX-51 reentrant stack? I am using
the "compact reentrant" declaration for my reentrant functions. The
stack is located in PDATA (< 0x100), yet during a task switch,
RTX-51thinks the stack is located near the task control block in XDATA
and is not saved or restored.

Any help would be appreciated.

Posted by TheDoc on April 27th, 2006



"Bruce" <sourcebug@yahoo.com> wrote in message
news:1146078213.001717.90240@y43g2000cwc.googlegro ups.com...

Not used rtx for a while, but if I recall, to use compact reentrant you will
have to have the compiler/linker set for LARGE model




Posted by TheDoc on April 27th, 2006



"TheDoc" <thedoc@ev1.net> wrote in message
news:asU3g.34287$ZB1.24108@tornado.texas.rr.com...
using xdata
with large memory model..



Posted by Dejan on April 28th, 2006


"Bruce" <sourcebug@yahoo.com> wrote in message
news:1146078213.001717.90240@y43g2000cwc.googlegro ups.com...
Reentrant stack is managed by RTX51 - that is, each task has it's own
reentrant stack
space located inside XDATA ram page allocated to each stack it by RTX51. The
size
of that page is 256 bytes and it serves as both reentrant stack (if used)
and context save
space. When the context changes, RTX51 manages reentrant stack pointer to
point
to the corresponding area. That allows quick context change, as the stack
does not have
to be saved/copied, which is not the case with the internal hardware stack.

regards

Dejan




Similar Posts