Reinhard Nissl wrote:
[ ... fixing thread handling ... ]
Somehow this is getting a little too complicated for my taste.
There's way too much locking and condvar stuff being introduced.
I suggest the attached patch against thread.[hc] of VDR 1.3.17.
The main changes here are that the child thread no longer
accesses childTid at all (it calls pthread_self() directly),
and the running state is stored in a simple boolean variable,
which requires no extensive locking since it is read/written
atomically. parentTid has been removed, since it was never actually
used.
Please take a look at this and let me know if you can find a
possible loophole there.
For testing purposes, I removed all of the previous theading patches and
applied your new one. With this new thread patch, all of my plugins seem
to be working. If something breaks, I will be sure and let you know. ;)