Please forgive my ignorance.

> This function is used to switch the stack and execute a given function.

Why do we have to switch the stack?
For instance, what would happen if we do not switch the stack?

Regards,
Jaeyong

On Tue, Jan 8, 2013 at 7:31 PM, Sebastian Sumpf <
[email protected]> wrote:

> Hello Jaeyong,
>
> On 01/08/2013 03:26 AM, jaeyong yoo wrote:
> > Hello,
> >
> > Could you explain about the intend behind platform_execute in usb_drv?
> > I see it is similar to executing a function but it uses stack allocated
> > by dde_kit_simple_malloc, and I don't understand why.
>
> This function is used to switch the stack and execute a given function.
> Since stack switching has to be performed in assembly, the function must
> be implemented for each platform (e.g. ARM, x86). In the great picture
> this is part of a very simple user-threading implementation. Each
> "pseudo" thread needs a stack to need lose its call trace, such a thread
> is scheduled using setjmp/longjmp calls (see:
> dde_linux/src/drivers/usb/routine.h).
>
>
> Regards,
>
> Sebastian
>
>
>
> --
> Sebastian Sumpf
> Genode Labs
>
> http://www.genode-labs.com · http://genode.org
>
> Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
>
>
>
>
>
> ------------------------------------------------------------------------------
> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only - learn more at:
> http://p.sf.net/sfu/learnmore_122512
> _______________________________________________
> Genode-main mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/genode-main
>
------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Genode-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/genode-main

Reply via email to