reading multiple serial ports

Hi

I´m having some problems with mutithreads. When I use 1 process with 4 threads, where each thread READ one serial port, my app don´t work…

I need read 4 serial ports and each port must make logging. When some port doesn’t receive data for 33ms I need make another logging.

When I use the 4 qtalk process, just for read data and logging,it work, but when I use one process with 4 threads …I have problems

What is the best way to do it?
I´m using the readcond and timeout
QNX 6.5
thanks you

There’s no reason you shouldn’t be able to read 4 serial ports with 4 threads. Maybe you should post some code so we can see what you are doing wrong.

Alternatively you could read 4 serial ports with 1 process (no threads) using a select() call with timeout set for handling no data received.

If all you are doing is reading the data from the serial port and logging it (ie no complex processing) then that’s the way I would go for simplicity sake.

Tim