[Tux4kids-discuss] high cpu usage
deepak.aggarwal9 at gmail.com
Sat Mar 12 10:54:39 UTC 2011
When i am working on new server systemthen i encounter a serious problen in
my program that
whenever i run server then either core of my cpu core have 100% usage.
I know this is happening because there is a infinite loop in a thread.
void * main_thread(void * data)
printf("\n There is some error while initializing thread");
printf("\n Value of active ports is:%d",child_active_ports);
// first server receive request from client to connect and open master
server socket. To be created only once.-permanent
return (void *)1;
//from here main problem starts i have to keep it in while loop so that it
// connect to different clients so that it can work as concurrent server. Is
there any way
// is there any other way to do it and avoid high cpu usage.
printf("\n Value of active ports:%d",child_active_ports);
printf("\n Activating thread");
printf("\nEverything is OK now exiting");
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tux4kids-discuss