[kaffe] pthread issues

Adam Heath doogie at brainfood.com
Wed Dec 8 22:16:17 PST 2004

On Wed, 1 Dec 2004, Peter Naulls wrote:

> [CCs at Dilabor's suggestion]
> I'm trying to debug threading issues in my port of Kaffe to RISC OS.
> Chances are, the problem is in our pthread/C library implementation,
> since it hasn't been used terribly widely.
> Please don't suggest I use jthreads, as it needs some work to even
> compile for RISC OS.  Please also try not to make assumptions about RISC
> OS - it is a long way from POSIX, although much of that is hidden by our
> Unix compatibility library.
> Running an empty program/hello world results in the C library detecting
> a deadlock after the program completes.
> Using -vmdebug JTHREAD on the same programs results in Kaffe itself
> detecting a deadlock very early on. e.g.:

I just checked in a fix, that might let this work.

2004-12-08  Adam Heath  <doogie at brainfood.com>

        * kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:
          Call unprotectThreadList *before* calling pthread_exit.  This
          prevents deadlocks during shutdown(discovered while getting xprof
          to work).

More information about the kaffe mailing list