LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Return of State in a thread (https://www.linuxquestions.org/questions/programming-9/return-of-state-in-a-thread-401122/)

lucky6969b 01-09-2006 03:55 AM

Return of State in a thread
 
Hi,
I've a monitor thread established, and then there is a loop that is watching is serial port. After all data has been read, how do I set it back to monitor state?

I asked this because my thread keeps looping and keeps getting garbage data after reading 1-2 times of valid data. I'm sure the program has broken from the loop. But the loop is entered again without another interrupt coming from the serial port.

I might be missing something. But if you can see the potential logic error is, please post.

Thanks in advance
Jack

jtshaw 01-09-2006 10:12 AM

Any chance you can post the code? Providing you are actually getting out of the read loop I'm guessing the problem is your logic for going back into the read loop....


All times are GMT -5. The time now is 08:34 PM.