classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JNI/CNI Revisited


From: Tom Tromey
Subject: Re: JNI/CNI Revisited
Date: 01 Mar 2003 13:12:46 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "Aaron" == Aaron M Renn <address@hidden> writes:

Aaron> Right now Classpath just hardcodes these as FD 0, 1, and 2.
Aaron> Probably not a good idea.  The nativeInit() method was one I
Aaron> envisioned being called as part of static initialization a la
Aaron> gcj, and thus it could set up these values.

For some reason I assumed your `nativeInit' method had to do with
initializing an instance -- but of course open() can be used for that.

Aaron> Interesting that it was done for performance reason.  I thought
Aaron> perhaps it was becuase we could not always guarantee that we
Aaron> could determine the current file position without tracking it.
Aaron> I think Classpath does something like lseek(fd, 0, SEEK_CUR)
Aaron> but this may not be portable.

Here's the thread:

    http://gcc.gnu.org/ml/java-patches/2003-q1/msg00013.html

We were doing 3 lseek()s per FileDescriptor.seek operation.

Tom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]