This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

thread spawning


hi!

I am trying to implement a tcp server program in redboot. I want it to
run as a different thread in the background. i have written a simple tcp
server program which just listens on port and have used the __tcp_poll()
function.

i have spawned the thread using
 
_externC void cyg_httpd_startup(void)
{
   cyg_thread_create( 11,                               		   
(cyg_thread_entry_t*)cyg_httpd_init,
                       0,
                       "HTTPD",
                       &httpd_stacks[0][0],  
                     CYGNUM_HAL_STACK_SIZE_TYPICAL, 
                       &httpd_thread[0],
                       &httpd_thread_object[0]
        );

i have included a command in main.c file. On the execution of the
command, cyg_httpd_startup API gets called. this in turn is supposed to
spawns the thread. But on the execution of this command, the thread gets
spawned but nothing happens after that. the whole system just hangs. i
have printed the threads and found that there are 2 threads one is idle
and the other one is the one spawned by me. 

what should i do to make this thread run in background so that i get my
redboot prompt even after i have spawned a new thread.

thanks 
sai naidu  


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]