Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Mar 2001 21:06:35 -0700 (MST)
From:      Nate Williams <nate@yogotech.com>
To:        "Jeroen C. van Gelderen" <jeroen@vangelderen.org>
Cc:        Nate Williams <nate@yogotech.com>, FreeBSD Java <freebsd-java@FreeBSD.ORG>, Ari Suutari <ari@suutari.iki.fi>
Subject:   Re: Are syscall wrappers needed in JNI?
Message-ID:  <15007.7243.450197.223135@nomad.yogotech.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15007.7243.450197.223135>