Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Mar 2001 21:27:59 -0400
From:      "Jeroen C. van Gelderen" <jeroen@vangelderen.org>
To:        Nate Williams <nate@yogotech.com>
Cc:        FreeBSD Java <freebsd-java@FreeBSD.ORG>, Ari Suutari <ari@suutari.iki.fi>
Subject:   Re: Are syscall wrappers needed in JNI?
Message-ID:  <3A9EF71F.A13189C6@vangelderen.org>
References:  <3A9AE85F.C6F06D96@vangelderen.org> <15002.60084.89087.467979@nomad.yogotech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

Sorry for the delay in response but I've been busy hacking
JNI :-(

Nate Williams wrote:
> 
> > So... I'm hoping that someone here has the magic knowledge in
> > his/her brain... How does one properly use libc from within Java?
> 
> You can't in the current JDK1.1 stuff.  

I take it you meant to say JDK 1.2 beta as well? Or not? 

Ari Suutari mailed me this reply (fwd with permission):

------------------------------------------------
Jeroen C. van Gelderen wrote:
> I had a look at the FreeBSD CommAPI implementation. It seems 
> to just mark it's filedescriptors as O_NONBLOCK and uses the 
> plain system calls from then on. 
> 

    I think this is because the .so is dynamically loaded into
    JVM, which contains necessary wrappers, ie. "poll" isn't
    the actual system call in this environment, it is the wrapper
    that does all kinds of things before doing "poll". 

    This is the case at least for JDK 1.2.2. I did some research
    on this one because the FreeBSD comm api used "select", for
    which there wasn't a wrapper at some time (don't know about
    the current situation). This caused the JVM to hang in weird
    way sometimes. I replaced "select" with "poll", which had
    a wrapper inside JVM and everything worked very well after that.

        Ari S.
------------------------------------------------

Your statement and his seem to contradict each other. Could
either of you clarify matters here?

Cheers,
Jeroen
-- 
Jeroen C. van Gelderen - jeroen@vangelderen.org

"If I could save the Union without freeing any slave I would do it;
 and if I could save it by freeing some and leaving others alone I
 would also do that." -- Abraham Lincoln, August 22, 1862

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?3A9EF71F.A13189C6>