This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: java.io.FileDescriptor enhancement
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Dienstag, 1. April 2003 10:15 schrieb Tom Tromey:
> >>>>> "Michael" == Michael Koch <konqueror at gmx dot de> writes:
>
> Michael> I wondered about the usage of 'long' for the native fd in
> Michael> classpath. Why not int ? Isnt int big enough for 64 bit
> Michael> archs ? Or is it just to be on the safe side ?
>
> int is only 32 bits. Classpath is probably taking the approach of
> assuming that we don't know anything about the underlying fd -- it
> might be a pointer on a 64-bit machine. This is a pretty
> reasonable thing to do. Maybe there's some embedded OS that does
> this. Or maybe you want to use stdio for your FileDescriptor
> implementation. Or maybe there's a 64 bit Windows (I assume there
> is but I really don't know).
>
> Michael> I want to avoid using the native fd directly in java.nio
> because it Michael> cannot be shared. And the advantage is that it
> handles close() Michael> correctly when called more then once. With
> long (int) as fd type we Michael> will have problems.
>
> I'm confused. I thought your patch exposed the underlying int to
> java.nio. But this quoted paragraph seems to indicate that it
> isn't what you want.
I think I need the native fd for some operations directly in java.nio,
e.g. to do a select on some native fds.
Hmm, maybe this is not a so good idea ...... well, have to think more
about it. Bringing java.io and java.nio together is not an easy task
....
Michael
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+iU6ZWSOgCCdjSDsRAtx1AJ0VFkkb5YSRjGff9DijjG9aQkXLjQCfaaHG
K1M/J2miDMpoyRX4QqBzhfQ=
=O+hB
-----END PGP SIGNATURE-----