From owner-freebsd-java Thu Mar 1 20: 6:42 2001 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 8E82737B71A for ; Thu, 1 Mar 2001 20:06:39 -0800 (PST) (envelope-from nate@yogotech.com) Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.123.131]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id VAA20853; Thu, 1 Mar 2001 21:06:37 -0700 (MST) (envelope-from nate@nomad.yogotech.com) Received: (from nate@localhost) by nomad.yogotech.com (8.8.8/8.8.8) id VAA24812; Thu, 1 Mar 2001 21:06:35 -0700 (MST) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15007.7243.450197.223135@nomad.yogotech.com> Date: Thu, 1 Mar 2001 21:06:35 -0700 (MST) To: "Jeroen C. van Gelderen" Cc: Nate Williams , FreeBSD Java , Ari Suutari Subject: Re: Are syscall wrappers needed in JNI? In-Reply-To: <3A9F015A.CE487843@vangelderen.org> References: <3A9AE85F.C6F06D96@vangelderen.org> <15002.60084.89087.467979@nomad.yogotech.com> <3A9EF71F.A13189C6@vangelderen.org> <15006.63617.145790.5705@nomad.yogotech.com> <3A9F015A.CE487843@vangelderen.org> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > What I don't understand is that Ari says it can actually work > whereas you seem to indicate that calling libc functions > cannot be done until we get pthreads going... It can be done, but not 'safely'. > Are the two of you perhaps saying that one can call only those > libc functions that are also used by the JDK and therefore > exported from libhpi.so in wrapped form? (This interpretation > seems to agree with an nm libhpi.so in that nm reveals an > export for poll but not one for select which would explain > Ari's problems using poll. Except Ari implies that select didnt' work, but poll did. I would think the above is correct. > If the answer is yes I am happy because it means that my UNIX > domain socket project is feasible because all the calls I need > for UNIX socket support are already used by the JVM for it's > java.net.(Server)Socket implemtation (read/write/accept/...). > [...] > > Interesting enough, from my memory, select is wrapped in the JVM, but > > poll was not. My suspicion is that the wrapping was causing problems, > > and his modification to use 'poll' caused it to call the native poll, > > instead of the wrapped 'select' version, which can cause problems. > > The other way around. He called select which failed but everything > was fine after he switched to using poll which is wrapped in the > current JDK. Again, I'm pretty sure that select is wrapped, but poll isn't. At least, for JDK1.1 that is the way thing were, and I'm almost positive it's wrapped in JDK1.2. In particular, X11 and the Motif libraries use select, which is why they must be wrapped. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message