read serial interfaces inside of a thread

Aug 17, 2005 2 Replies

Hello, I want to read/write 10 serial interfaces inside of a thread (one after another in the thread-function, but in the thread). It seems to work, but sometimes my program hangs. I wonder if the read/write-thread might the cause.



Does the libc is thread-safe for reading/writing the serial lines (or generally reading/writing device files)?


Libs which are used: libstdc++-3-libc6.2-2-2.10.0.so libc.so.6 libpthread.so.0


Thanks in advance, Juergen


Hi Jürgen,

did you have compiled your Code with the 'REENTRANT' switch ? This is a must when you use threads.

Kai

Kai Schories schrieb:

Yes, I did...

Thank you! Jürgen

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required