From: Dave H. <dhy...@gm...> - 2006-09-04 19:21:30
|
Hi Darren, > Anyone have any idea what might cause this? Could it be a thread > priority thing? What could be happening in the linux world like > clockwork every 10 seconds that would cause my app to hiccup when > echoing serial data, but not when doing an FFT and generating serial > data? Is there a cleverer way to do the echoing perhaps than a busy > loop? If your busy loop is running as a separate thread then that should be fine. I'm assuming here that you've setup the serial port to with VMIN=1 How big a read are youu doing? Hopefully bigger than a single character. I'd recommand using a buffer size of a few K anyways. That way, if your process is held off for some reason, the charaters will continue to buffer, and you'll get all of the data that's accumulated in one read operation. Reading single characters is highly ineffecient (although very responsive). Are all of your thread blocking? I.e. you don't want them to be polling. Polling threads essentially consume 100% of the CPU while they're running. -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |