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