Patch for running Java2D demo (jdk-1.4.1p3_3)

Terry Lambert tlambert2 at mindspring.com
Mon May 5 20:02:31 PDT 2003


Daniel Eischen wrote:
> > Personally, I don't think this is justifiable, and that the
> > problem is actually a coding error in the threaded program,
> > with failure to comply with the POSIX and Single UNIX
> > Specification when writing your threaded program.  The pthreads
> > documentation seems to back me up (Chapter 12 of "Go Solo 2",
> > as well as Corrigenda).
> 
> It *is* an rtld-elf problem.  I've protected dlfoo() all with the
> same mutex and it still hangs.  rtld-elf uses spinlocks in
> areas that aren't called by dlfoo().

That doesn't say anything against what I've said.  You haven't
modified the JVM to not call pthreads unsafe operations over a
potential involuntary context switch, without some method of
preventing the context switch.

Please see my quote from Chapter 12 of the Single UNIX Specification
about how pthreads implementations are supposed serialize operations
through unsafe operations themselves, instead of expecting the
library to do it for them.

You might as well serialize access to static buffers, as serialize
access to non-threads reentrant system calls, if you are trying to
make threads unsafe calls safe for threads.

-- Terry


More information about the freebsd-threads mailing list