Please forgive my ignorance.<br><br>> This function is used to switch the stack and execute a given function.<br><br>Why do we have to switch the stack?<br>For instance, what would happen if we do not switch the stack?<br>
<br>Regards,<br>Jaeyong<br><br><div class="gmail_quote">On Tue, Jan 8, 2013 at 7:31 PM, Sebastian Sumpf <span dir="ltr"><<a href="mailto:Sebastian.Sumpf@...1..." target="_blank">Sebastian.Sumpf@...1...</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Jaeyong,<br>
<div class="im"><br>
On 01/08/2013 03:26 AM, jaeyong yoo wrote:<br>
> Hello,<br>
><br>
> Could you explain about the intend behind platform_execute in usb_drv?<br>
> I see it is similar to executing a function but it uses stack allocated<br>
> by dde_kit_simple_malloc, and I don't understand why.<br>
<br>
</div>This function is used to switch the stack and execute a given function.<br>
Since stack switching has to be performed in assembly, the function must<br>
be implemented for each platform (e.g. ARM, x86). In the great picture<br>
this is part of a very simple user-threading implementation. Each<br>
"pseudo" thread needs a stack to need lose its call trace, such a thread<br>
is scheduled using setjmp/longjmp calls (see:<br>
dde_linux/src/drivers/usb/routine.h).<br>
<br>
<br>
Regards,<br>
<br>
Sebastian<br>
<br>
<br>
<br>
--<br>
Sebastian Sumpf<br>
Genode Labs<br>
<br>
<a href="http://www.genode-labs.com" target="_blank">http://www.genode-labs.com</a> · <a href="http://genode.org" target="_blank">http://genode.org</a><br>
<br>
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden<br>
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth<br>
<br>
<br>
<br>
<br>
------------------------------------------------------------------------------<br>
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS<br>
and more. Get SQL Server skills now (including 2012) with LearnDevNow -<br>
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.<br>
SALE $99.99 this month only - learn more at:<br>
<a href="http://p.sf.net/sfu/learnmore_122512" target="_blank">http://p.sf.net/sfu/learnmore_122512</a><br>
_______________________________________________<br>
Genode-main mailing list<br>
<a href="mailto:Genode-main@lists.sourceforge.net">Genode-main@...12...ceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/genode-main" target="_blank">https://lists.sourceforge.net/lists/listinfo/genode-main</a><br>
</blockquote></div><br>