Thread cancellation problem
Branko on dkts
brankok at dkts.co.yu
Fri Nov 12 18:40:18 EST 2004
Hello group!
I would be most grateful for your help.
I am developing a Linux application for ppc. The ppc Linux distribution I am using is ELDK 3.0. I am having a problem with canceling a thread blocked on read. The thread tries to read data from a HDLC device.
I tried to cancel the read thread with thread_cancel() called from another thread which did not work as I would like, because the reader thread remains blocked until there is data arrived. I also tried to set up a signal handler (SIGTERM) for the thread and then to call pthraed_kill() from another thread which would cause the read() to return -1 with an errno of EINTR which would indicate the reader thread to terminate itself. However, the read does not return and the reader thread remains blocked...
Any suggestions as to what to do next?
Kindest regards,
Branko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20041112/cf906ab6/attachment.htm
More information about the Linuxppc-embedded
mailing list