Re: [pok-devel] Reset of the stack and the context

[ Thread Index | Date Index | More lists.tuxfamily.org/pok-devel Archives ]


Le Mon, Mar 05, 2012 at 01:46:43PM +0100, Matias Hastaran :
> Hello,
> 
> I'm implementing the DELAYED_START function (ARINC653), and, as usual, I have one question:
> To implement the DELAYED_START, ARINC ask the reset of the context and the stack. How can I do that ? It does not seem to me that POK implements that kind of functionality but I can make a mistake.. 
> If I must implement a reset, If i do a memset on the stack and on the context follow by a re-set of start_context_t entry, id, ctx._esp, ctx.eip, ctx.cs and ctx.eflags values, will that work ?

Dear Matias,

As you noticed, the reset of the stack is not implemented. So, I assume
resetting the memory would be ok. In that case, please provide a
high-level function such as pok_reset_thread_stack (thread_id) that will
later call the appropriate low-level function
pok_reset_stack_[x86|ppc|sparc] so that we make sure that the function
would be correctly called for all architecture. Also, as you might also
be interested by the x86 architecture, just put stub functions for the
other architectures but please put them in the repository to make sure
it will compile (you can just implemente the functions for the other
architecture with a print ("UNIMPLEMENTED") to warn potential other
users.

Hope that helps :-)

Best,




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/