It executes at 0x00100. regards, Alok
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michele Portolan Sent: Wednesday, June 27, 2007 3:18 PM To: [email protected] Subject: [ECOS] About threads A little stupid question about threads: if I create a thread to execute the function "hello", is the code of the function copied or not? I better explain mysel: let's say function hello is stored at address 0x00100, and teh code to xcreate the thread is as following: cyg_thread thread_s[N_THREADS]; /* space for two thread objects */ char stack[N_THREADS][4096]; /* space for two 4K stacks */ cyg_handle_t hello_thread; .... cyg_thread_create(4, (void (*)(cyg_addrword_t data) )hello, (cyg_addrword_t) 0, "hello", (void *) stack[0], 4096, &hello_thread, &thread_s[0]); When the thread gets executed, does it executes "hello" at 0x00100 or a copy of it stored somewhere in "stack" or "thread_s"? Thank you very much, Michele -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
