From owner-freebsd-java Tue Jul 18 15:54:23 2000 Delivered-To: freebsd-java@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id B878A37BBBF for ; Tue, 18 Jul 2000 15:54:20 -0700 (PDT) (envelope-from nate@yogotech.com) Received: from nomad.yogotech.com (yogotech.nokia.com [4.22.66.156]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id QAA29648; Tue, 18 Jul 2000 16:54:17 -0600 (MDT) (envelope-from nate@nomad.yogotech.com) Received: (from nate@localhost) by nomad.yogotech.com (8.8.8/8.8.8) id QAA07023; Tue, 18 Jul 2000 16:54:07 -0600 (MDT) (envelope-from nate) Date: Tue, 18 Jul 2000 16:54:07 -0600 (MDT) Message-Id: <200007182254.QAA07023@nomad.yogotech.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: "Tom O'Connor" Cc: Subject: Re: JDK118, C++, pthreads, and JNI In-Reply-To: References: X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > 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