Date: Tue, 18 Jul 2000 16:54:07 -0600 (MDT) From: Nate Williams <nate@yogotech.com> To: "Tom O'Connor" <tom@surety.com> Cc: <freebsd-java@FreeBSD.ORG> Subject: Re: JDK118, C++, pthreads, and JNI Message-ID: <200007182254.QAA07023@nomad.yogotech.com> In-Reply-To: <NDBBLFKCHJHJDLMODNBEOEBPCDAA.tom@surety.com> References: <NDBBLFKCHJHJDLMODNBEOEBPCDAA.tom@surety.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> I have a C++ library that I am putting a Java wrapper around using JNI. When > some objects in the C++ library are created, pthreads are also created and > started. > > I compile the C++ code using g++, and then create the .so with ld, > explicitly linking the reentrant C++ runtime, and my other C++ libraries. > This is done because the .so wouldn't load, the exception handling symbols > were missing. > > Java calls into my native call and executes until it reaches the method call > of an object in the C++ library I'm attempting to wrap that creates and > starts some pthreads. At that point, the JVM SEGV's. > > Is it possible to get JDK118, a pthread'ed C++ library accessed through JNI, > on FreeBSD 4.0-20000714-STABLE to play nicely together? Not very easily, if at all. It would certainly take alot of work, and it's not something I would recommend. It would almost certainly require re-writing either the pthreads internals and/or the green threads internals, since I believe both use the same signals to do the 'threading' internally. Basically, pthreads and the green threads implementation in the JDK are not compatible with one another. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007182254.QAA07023>