Hello frnds..
i m using while loops in my code.. bec of that my application uses almost 90% of CPU resources.. its not lettin others applications to run..
actually i have to read some signal from serial port... n till i dont get it high or low..
i have to read that signal continuously... its for this reason i m using while loops.
while(1)
{
status=read_CTS();
if(status==1)
continue;
else if(status==0)
{
---------
some code
--------
break;
}
}
someone suggested me to use sleep in the while loop..
i cant use it bec we are workin on realtime systems...
so we usually avoid using delay n sleep....
can anyone help me on this ???
my application is on C++/fedora