read serial interfaces inside of a thread

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

Reply to
Juergen Querengaesser
Loading thread data ...

Hi Jürgen,

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

Kai

Reply to
Kai Schories

Kai Schories schrieb:

Yes, I did...

Thank you! Jürgen

Reply to
Juergen Querengaesser

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.