Date: Mon, 05 May 2003 20:01:02 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Daniel Eischen <eischen@pcnet1.pcnet.com> Cc: threads@freebsd.org Subject: Re: Patch for running Java2D demo (jdk-1.4.1p3_3) Message-ID: <3EB7256E.844A5958@mindspring.com> References: <Pine.GSO.4.10.10305050710430.15251-100000@pcnet1.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EB7256E.844A5958>
